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

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

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