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

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

code_blocks
مسئله مربوطه: رستگاری آرتور (#1) arrow_outward
verified
وضعیت داوری نهایی: پذیرفته شد
terminal
زبان برنامه‌نویسی: Python
schedule
ارسال‌کننده و زمان:
Kiana Nasiri (۳ سال پیش)
descriptionsolution.py ۱۴ خط • ۲۵۶ بایت
1n= int (input())
2str = input()
3numberstr = str.split()
4number = [int(numbers) for numbers in numberstr ]
5j = n
6count = 0
7
8for i in range( n // 2):
9 j = n - 1 - i
10 count += abs(number[i] - number[j])
11
12
13print(count)
14
کد ارسال‌شده برای داوری خودکار هاتکدز UTF-8