«   2026/05   »
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
Archives
Today
Total
«   2026/05   »
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
Archives
Today
Total
관리 메뉴

기술은 감각이다, 밀론 블로그

백준 브루트포스 - 1436 [파이썬] 본문

프로그래밍/백준

백준 브루트포스 - 1436 [파이썬]

milron 2025. 8. 12. 01:55

 


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

 

"문제풀이 경험을 글로 남기는 순간, 코딩은 공부가 아닌 포트폴리오가 된다."