-
Notifications
You must be signed in to change notification settings - Fork 0
/
#백준 단계별로 풀어보기 3.py
98 lines (85 loc) · 1.73 KB
/
#백준 단계별로 풀어보기 3.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#백준 단계별로 풀어보기 3.반복문
# 2739번
a = int(input())
for i in range(1,10):
print("%d * %d = %d" %(a,i,a*i))
# 10950번
n = int(input())
nums = []
for i in range(0,n):
count = list(map(int, input().split()))
nums.append(count)
for i in range(0,n):
print(nums[i][0]+nums[i][1])
# 8393번
n = int(input())
k = 0
for i in range(1,n+1):
k += i
print(k)
# 25304번
sum = int(input())
n = int(input())
nums = []
for i in range(n):
c = list(map(int, input().split()))
nums.append(c)
test = 0
for i in range(n):
test += nums[i][0] * nums[i][1]
if(sum == test):
print("Yes")
else:
print("No")
# 25314번
n = int(input())
count = 0
for i in range(0,n,4):
count += 1
print("long "*count +"int")
# 15552번
import sys
n = int(input())
for i in range(n):
a,b = map(int, sys.stdin.readline().split())
print(a+b)
# 11021번
n = int(input())
nums = []
for i in range(0,n):
count = list(map(int, input().split()))
nums.append(count)
for i in range(n):
print("Case #%d: %d" %(i+1,nums[i][0]+nums[i][1]))
# 11022번
n = int(input())
nums = []
for i in range(0,n):
count = list(map(int, input().split()))
nums.append(count)
for i in range(n):
print("Case #%d: %d + %d = %d" %(i+1,nums[i][0],nums[i][1],nums[i][0]+nums[i][1]))
# 2438번
n = int(input())
for i in range(1,n+1):
print("*"*i)
#2439번
n = int(input())
for i in range(1,n+1):
print(" "*(n-i)+"*"*i)
#10952번
k = 1
while k==1 :
n = list(map(int, input().split()))
if(n[0] == 0 and n[1]==0):
k = 0
break
else:
print(n[0]+n[1])
# 10951번
while True:
try:
A, B= map(int,input().split())
print(A+B)
except:
break