[SWEA D2] 1926. 간단한 369게임

shin·2022년 11월 15일
0

CodingTest 문제 풀이

목록 보기
36/79

풀이

N = int(input())
for n in range(1, N + 1):
    check = -1
    for i in str(n):
        if i in ("3", "6", "9"):
            check = 1
            print("-", end = "")
    if check == -1:
        print(n, end = " ")
    else:
        print(end =" ")
profile
Backend development

0개의 댓글