123456789101112131415161718192021222324252627282930 |
- from typing import List
- #f = open('numbers.txt', 'r')
- #line = f.readline()
- #while line:
- # print(line)
- #line = f.readline()
- #a = line.split(' ')
- #f.close()
- with open('numbers.txt', 'r') as f:
- line = f.readline()
- # for line in f:
- # print(line, end='')
- a = line.split(' ')
- num1 = int(a[0])
- num2 = int(a[1])
- num3 = int(a[2])
- print(a)
- print(num1)
- print(num2)
- print(num3)
- for i in range(1, num3 + 1):
- if i % num1 == 0 and i % num2 == 0:
- print("FB", end = " ")
- elif i % num1 == 0:
- print("F", end = " ")
- elif i % num2 == 0:
- print("B", end = " ")
- else:
- print(i, end = " ")
|