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

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

code_blocks
مسئله مربوطه: رستگاری آرتور (#1) arrow_outward
verified
وضعیت داوری نهایی: پذیرفته شد
terminal
زبان برنامه‌نویسی: Python
schedule
ارسال‌کننده و زمان:
Amir Mohammad Baghche sara (۱ سال پیش)
descriptionsolution.py ۸ خط • ۱۶۳ بایت
1n=int(input())
2obstacle = list(map(int, input().split()))
3shot = 0
4
5for i in range(int(n/2)):
6 d = abs(obstacle[i] - obstacle[n-i-1])
7 shot += d
8print(shot)
کد ارسال‌شده برای داوری خودکار هاتکدز UTF-8