Skip to content

Commit f6505a1

Browse files
committed
[D2] Title: 간단한 369게임, Time: 55 ms, Memory: 53,632 KB -BaekjoonHub
1 parent 1c2433d commit f6505a1

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# [D2] 간단한 369게임 - 1926
2+
3+
[문제 링크](https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV5PTeo6AHUDFAUq)
4+
5+
### 성능 요약
6+
7+
메모리: 53,632 KB, 시간: 55 ms, 코드길이: 359 Bytes
8+
9+
### 제출 일자
10+
11+
2025-05-17 20:16
12+
13+
14+
15+
> 출처: SW Expert Academy, https://swexpertacademy.com/main/code/problem/problemList.do
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
T = int(input())
2+
ans = []
3+
for i in range(1, T + 1):
4+
c = str(i)
5+
count_3 = c.count('3')
6+
count_6 = c.count('6')
7+
count_9 = c.count('9')
8+
9+
if count_3 > 0 or count_6 > 0 or count_9 > 0:
10+
# 3, 6, 9가 포함된 경우
11+
result = '-' * (count_3 + count_6 + count_9)
12+
ans.append(result)
13+
else:
14+
ans.append(c)
15+
16+
print(*ans)

0 commit comments

Comments
 (0)