백준 반복문

·2023년 12월 16일
0

백준

목록 보기
2/2

반복문

# 2738번 /  구구단
n = int(input())

for i in range(1,10):
	print(n, '*', i, '=', n*i)
    
    
# 10950번 / A+B - 3
t = int(input())

for i in range(t):
  a,b = map(int, input().split())
  print(a+b)
  
  
# 8393번 / 합
n = int(input())

t = 0
for i in range(1, n+1):
  t += i
print(t)


# 25304번 / 영수증
x = int(input())
n = int(input())

s=0

for i in range(n):
  p,c=map(int, input().split())
  s+=p*c

if x==s:
  print('Yes')
else:
  print('No')

0개의 댓글