기술은 감각이다, 밀론 블로그
백준 브루트포스 - 1436 [파이썬] 본문
https://www.acmicpc.net/problem/1436https://www.acmicpc.net/problem/10172

[틀린 코드]
#python 코드
[정답 코드]
N=int(input())
x, y=0, 0
while True:
x+=1
if "666" in str(x):
y+=1
if y == N:
print(x)
break
[생각&설명]
옛날에 푼거라 기억이 잘 안 나네용.
근데 while 문 몰라서 꽤나 애먹은 기억은 있네요.
str(x)안의 문자열에서 666을 자동으로 검사한 다는게 조금 신기했습니다.
필자의 깃허브:
GitHub - kelliven/baeeeeeeeejoon_cording_project: This is an auto push repository for Baekjoon Online Judge created with [Baekjo
This is an auto push repository for Baekjoon Online Judge created with [BaekjoonHub](https://github.com/BaekjoonHub/BaekjoonHub). - kelliven/baeeeeeeeejoon_cording_project
github.com
"문제풀이 경험을 글로 남기는 순간, 코딩은 공부가 아닌 포트폴리오가 된다."
'프로그래밍 > 백준' 카테고리의 다른 글
| 코딩 문제풀이 카테고리 만들었다. feat. 백준 (0) | 2025.07.28 |
|---|