scientific_comp_projects/CODE/[python]kattis/trivial/fizzbuzz.py
2021-10-29 15:16:40 +02:00

20 lines
370 B
Python

into = input()
x, y, n = into.split(' ')
for i in range(1,int(n)+1):
fizz = False
buzz = False
if i%int(x)==0 :
fizz = True
if i%int(y)==0 :
buzz = True
if fizz and buzz :
print('FizzBuzz')
elif fizz and not buzz :
print('Fizz')
elif buzz and not fizz :
print('Buzz')
else :
print(i)