📜  FizzBuzz FizzBuzz 是一个众所周知的编程任务,在面试中被问到. - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:46.325000             🧑  作者: Mango

代码示例1
n = int(input())

for x in range(1, n,2):
    if x % 3 == 0 and x % 5 == 0:
        print("SoloLearn")
        continue
    elif x % 3 == 0:
        print("Solo")
        continue
    elif x % 5 == 0:
        print("Learn")
        continue
    else:
        print(x)