118662024-11-12 22:58:38turierikVirágos rét (50 pont)python3Accepted 50/5039ms4976 KiB
import math
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/016ms3308 KiB
2Accepted0/016ms3116 KiB
3Accepted0/037ms4964 KiB
4Accepted2/216ms3092 KiB
5Accepted2/216ms2872 KiB
6Accepted2/216ms3052 KiB
7Accepted3/316ms2872 KiB
8Accepted3/314ms3092 KiB
9Accepted3/316ms2872 KiB
10Accepted2/216ms3120 KiB
11Accepted3/316ms3132 KiB
12Accepted2/214ms3128 KiB
13Accepted3/316ms3076 KiB
14Accepted2/234ms4840 KiB
15Accepted2/237ms4600 KiB
16Accepted3/337ms4712 KiB
17Accepted3/337ms4680 KiB
18Accepted3/339ms4964 KiB
19Accepted3/335ms4860 KiB
20Accepted3/335ms4964 KiB
21Accepted3/337ms4964 KiB
22Accepted3/337ms4976 KiB