113742024-08-28 08:24:2842Úthasználati díj (75 pont)python3Accepted 75/7532ms5080 KiB
N,K=map(int,input().split())
A=sum(list(map(int,input().split())))
X=min(A,K)
print((2*A-X)*(X-1)//2)
SubtaskSumTestVerdictTimeMemory
base75/75
1Accepted0/017ms3116 KiB
2Accepted0/017ms3088 KiB
3Accepted0/032ms4888 KiB
4Accepted5/517ms3048 KiB
5Accepted5/516ms3048 KiB
6Accepted5/516ms3192 KiB
7Accepted5/516ms2820 KiB
8Accepted5/516ms3184 KiB
9Accepted5/516ms3064 KiB
10Accepted5/516ms3088 KiB
11Accepted5/517ms3048 KiB
12Accepted5/516ms3184 KiB
13Accepted5/516ms3048 KiB
14Accepted5/532ms4896 KiB
15Accepted5/532ms4812 KiB
16Accepted5/532ms4872 KiB
17Accepted5/532ms5080 KiB
18Accepted5/532ms4904 KiB