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

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

code_blocks
مسئله مربوطه: رستگاری آرتور (#1) arrow_outward
verified
وضعیت داوری نهایی: پذیرفته شد
terminal
زبان برنامه‌نویسی: Python
schedule
ارسال‌کننده و زمان:
killer_hok (۳ سال پیش)
descriptionsolution.py ۷ خط • ۲۱۲ بایت
1# https://hotcodes.org/problem/1
2length = int(input())
3nums = list(map(int,input().split()))
4count = 0
5for index in range(length // 2) :
6 count += abs(nums[index] - nums[length - index - 1])
7print(count)
کد ارسال‌شده برای داوری خودکار هاتکدز UTF-8