Skip to content

Commit a3ceb5b

Browse files
committed
[BOJ] #2563. 색종이 / 실버5 / 38분 / 성공
1 parent 5c9ae36 commit a3ceb5b

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import sys
2+
input = sys.stdin.readline
3+
4+
n = int(input()) # 색종이의 수
5+
paper = [[0] * 100 for _ in range(100)] # 100x100 도화지 초기화
6+
7+
# 색종이를 하나씩 붙이기
8+
for _ in range(n):
9+
x, y = map(int, input().split())
10+
11+
# 10x10 크기의 영역을 1로 채운다.
12+
for i in range(x, x + 10):
13+
for j in range(y, y + 10):
14+
paper[i][j] = 1
15+
16+
# 도화지에서 1의 개수를 모두 더하여 넓이 계산
17+
answer = 0
18+
for row in paper:
19+
answer += sum(row)
20+
21+
print(answer)

0 commit comments

Comments
 (0)