144292025-01-10 18:33:51EmmaJuhaszVirágos rét (50 pont)python3Wrong answer 3/5072ms4960 KiB
n, k = input().split()
retek = [int(x) for x in input().split()]
n = int(n)
k = int(k)
m = 0
for i in retek:
  if i == 1:
    m += 1
jo_utak = 0
for i in range(m):
  jo_utak += m-(i+k)+1
print(jo_utak+1)
SubtaskSumTestVerdictTimeMemory
base3/50
1Accepted0/016ms3064 KiB
2Wrong answer0/014ms2864 KiB
3Wrong answer0/046ms4804 KiB
4Wrong answer0/216ms2872 KiB
5Wrong answer0/216ms2868 KiB
6Wrong answer0/216ms2992 KiB
7Wrong answer0/317ms2864 KiB
8Accepted3/317ms3028 KiB
9Wrong answer0/314ms2872 KiB
10Wrong answer0/216ms2864 KiB
11Wrong answer0/316ms2956 KiB
12Wrong answer0/217ms3044 KiB
13Wrong answer0/316ms3008 KiB
14Wrong answer0/271ms4824 KiB
15Wrong answer0/271ms4624 KiB
16Wrong answer0/357ms4728 KiB
17Wrong answer0/346ms4560 KiB
18Wrong answer0/364ms4960 KiB
19Wrong answer0/341ms4748 KiB
20Wrong answer0/370ms4788 KiB
21Wrong answer0/352ms4956 KiB
22Wrong answer0/372ms4808 KiB