87122024-01-26 10:56:48qawsedhztgVirágos rét (50 pont)pypy3Runtime error 25/5064ms100972 KiB
n,m = input().split()
n = int(n)
m = int(m)
b = 0
o = 0
a = input().split()
for i in range(n):
    if a[i] == "1":
        b += 1 
if b-m+2 >= 1:
    for i in range(1,b-m+2):
        o += i
else:
    o = 0
print(o)
SubtaskSumTestVerdictTimeMemory
base25/50
1Accepted0/041ms76060 KiB
2Accepted0/046ms76108 KiB
3Runtime error0/064ms100972 KiB
4Accepted2/241ms77384 KiB
5Accepted2/246ms77324 KiB
6Accepted2/248ms77548 KiB
7Accepted3/350ms77592 KiB
8Accepted3/343ms78244 KiB
9Accepted3/339ms77980 KiB
10Accepted2/241ms78332 KiB
11Accepted3/341ms79108 KiB
12Accepted2/250ms79032 KiB
13Accepted3/350ms79012 KiB
14Runtime error0/261ms98360 KiB
15Runtime error0/264ms95496 KiB
16Runtime error0/359ms95480 KiB
17Runtime error0/356ms95068 KiB
18Runtime error0/356ms94964 KiB
19Runtime error0/356ms95128 KiB
20Runtime error0/364ms95316 KiB
21Runtime error0/357ms95000 KiB
22Runtime error0/363ms94548 KiB