121562024-12-05 11:24:46gmilanVirágos rét (50 pont)python3Wrong answer 4/5057ms5048 KiB
n,k = list(map(int,input().split()))
p = list(map(int,input().split()))
otw = False
out = 0

for i in range(n):
    if otw == False and p[i] == 1:
        otw = True
    
    if otw == True and p[i] == 1:
        out = out + 1

out = out + 1
if out >= k:
    print(out)
else:
    out = 0
    print(out)
SubtaskSumTestVerdictTimeMemory
base4/50
1Accepted0/016ms3108 KiB
2Wrong answer0/016ms3128 KiB
3Wrong answer0/052ms4968 KiB
4Wrong answer0/216ms2876 KiB
5Accepted2/216ms2888 KiB
6Accepted2/216ms2980 KiB
7Wrong answer0/316ms3072 KiB
8Wrong answer0/316ms2992 KiB
9Wrong answer0/316ms3112 KiB
10Wrong answer0/216ms2876 KiB
11Wrong answer0/317ms2980 KiB
12Wrong answer0/217ms3128 KiB
13Wrong answer0/317ms3128 KiB
14Wrong answer0/254ms4776 KiB
15Wrong answer0/257ms4660 KiB
16Wrong answer0/354ms5048 KiB
17Wrong answer0/352ms4652 KiB
18Wrong answer0/354ms4804 KiB
19Wrong answer0/350ms5000 KiB
20Wrong answer0/357ms4968 KiB
21Wrong answer0/354ms4968 KiB
22Wrong answer0/357ms4836 KiB