arrow_forward همه ارسال‌ها

جزئیات ارسال کد#233

code_blocks
مسئله مربوطه: ماراتون پینگ پنگ (#16) arrow_outward
verified
وضعیت داوری نهایی: محدودیت زمان تست 5
terminal
زبان برنامه‌نویسی: Python
schedule
ارسال‌کننده و زمان:
Mujtablue io (۳ سال پیش)
descriptionsolution.py ۱۴ خط • ۲۷۱ بایت
1ball = int(input())
2bounces = 1
3shots = iter(range(round(ball / 2), 0, -1))
4
5
6while ball > 1:
7 shot = next(shots)
8 if not bool(ball % shot):
9 bounces += 1
10 ball = shot
11 shots = iter(range(round(ball / 2), 0, -1))
12
13
14print(bounces)
کد ارسال‌شده برای داوری خودکار هاتکدز UTF-8