118672024-11-12 22:59:05turierikVirágos rét (50 pont)python3Accepted 50/5039ms4996 KiB
n, k = map(int, input().split())
r = [int(x) for x in input().split()]
f = sum(r)
print(sum(range(f - k + 1, 0, -1)) if f >= k else 0)
SubtaskSumTestVerdictTimeMemory
base50/50
1Accepted0/014ms2980 KiB
2Accepted0/016ms2872 KiB
3Accepted0/035ms4968 KiB
4Accepted2/216ms2872 KiB
5Accepted2/216ms3080 KiB
6Accepted2/216ms3008 KiB
7Accepted3/316ms2892 KiB
8Accepted3/316ms2960 KiB
9Accepted3/316ms3076 KiB
10Accepted2/216ms2960 KiB
11Accepted3/314ms3000 KiB
12Accepted2/216ms3100 KiB
13Accepted3/316ms3024 KiB
14Accepted2/234ms4688 KiB
15Accepted2/237ms4508 KiB
16Accepted3/339ms4996 KiB
17Accepted3/335ms4492 KiB
18Accepted3/339ms4752 KiB
19Accepted3/335ms4896 KiB
20Accepted3/335ms4844 KiB
21Accepted3/339ms4756 KiB
22Accepted3/339ms4992 KiB