https://www.acmicpc.net/problem/1436 백준 알고리즘 1436번 n = int(input()) 종말 = 0 cnt=0 while True: if '666' in str(종말): # aㅏ... cnt+=1 if cnt == n: print(종말) break 종말 +=1