arrow_forward
همه ارسالها
جزئیات ارسال کد#219
برای پسندیدن وارد شوید
1def pong(receive: int) -> int:
2 potential_service = receive - 1
3 for service in range(potential_service, 0, -1):
4 if not bool(receive % service):
5 return service
6
7
8bounce = 1
9def ping(ball: int, bounce: int) -> int:
10 while ball > 1:
11 bounce += 1
12 ball = pong(ball)
13 return bounce
14
15
16ball = int(input())
17print(ping(ball, bounce))
کد ارسالشده برای داوری خودکار هاتکدز
UTF-8