본문 바로가기
Beakjoon&프로그래머스/파이썬

[백준/파이썬] 5292번 Counting Swann’s Coins

by 현장 2023. 3. 25.

-Code

for i in range(1, int(input()) + 1):
    if i % 3 == 0 and i % 5 == 0:
        print("DeadMan")
    elif i % 3 == 0:
        print("Dead")
    elif i % 5 == 0:
        print("Man")
    else:
        print(i, end=" ")