mirea-projects/First term/Algorithms/2-2/3.py

22 lines
368 B
Python
Raw Permalink Normal View History

2024-09-23 23:22:33 +00:00
def main() -> None:
n = int(input())
number = 1
numbers = []
while len(numbers) < n:
num = number
for divider in 2, 3, 5:
while num % divider == 0:
num //= divider
if num == 1:
numbers.append(number)
number += 1
print(numbers[n-1])
if __name__ == "__main__":
main()