Head vs breakz

[code] - 백준 for문 2739,10950,8393,15552,2741,2742,11021,11022,2438,2439,10871 python 본문

Head/Code

[code] - 백준 for문 2739,10950,8393,15552,2741,2742,11021,11022,2438,2439,10871 python

headbreakz 2020. 3. 16. 15:39

2739

#2739

a=int(input())

for i in range(1,10):
    
    print(a,"*",i,"=",a*i)
    

10950

#10950
t = int(input())

for i in range(t):
    a,b=map(int,input().split())
    print(a+b)

8393

#8393
a= int(input())
b= 0
for i in range(1,a+1):  
    c = i+b
    b = c
print(b)
   
    

15552

#15552
import sys

t=int(input())

for i in range (t):

    a,b = map(int, sys.stdin.readline().split())

    print(a+b)

2741

#2741

a = int(input())

for i in range(1,a+1):
    print(i)

2742

#2742

a = int(input())

for i in range(a,0,-1):
    print(i)

11021

#11021

t=int(input())

for i in range (1,t+1):

    a,b = map(int, input().split())
    c = a + b

    print("Case #%s: %s"%(i,c))

11022

#11022

t=int(input())

for i in range (1,t+1):

    a,b = map(int, input().split())
    c = a + b

    print("Case #%s: %s + %s = %s"%(i,a,b,c))

2438

#2438
t = int(input())

for i in range(1,t+1):
    print(i*"*")

2439

#2439
t = int(input())
for i in range(1,t+1):
    print((t-i)*" "+i*"*")

10871

#10871

a,b = map(int, input().split())
c =list(map(int,input().split()))


for i in range(a):    
    if c[i] < b :
        print(c[i],end=" ")
        
        

    
Comments