46132023-03-30 11:49:45MrPolarBearLeghosszabb nyaralás (75 pont)python3Wrong answer 16/7561ms34508 KiB
from sys import stdin,stdout

def main():
    nap,penz=map(int,stdin.readline().split())
    arak=list(map(int,stdin.readline().split()))
    mo=0
    ar=0
    napok=0

    for i in range(nap):
        if penz>ar:
            ar+=arak[i]
            napok+=1
        else:
            ar=0
            napok=0
        if napok>mo:
            mo=napok

    stdout.write(str(mo))
            

main()
SubtaskSumTestVerdictTimeMemory
base16/75
1Accepted0/017ms10952 KiB
2Wrong answer0/059ms32188 KiB
3Wrong answer0/317ms11364 KiB
4Accepted3/317ms11440 KiB
5Accepted3/317ms11660 KiB
6Accepted3/317ms11768 KiB
7Wrong answer0/317ms12084 KiB
8Wrong answer0/417ms12224 KiB
9Wrong answer0/417ms12364 KiB
10Wrong answer0/517ms12540 KiB
11Wrong answer0/521ms14040 KiB
12Wrong answer0/521ms15000 KiB
13Accepted7/750ms17720 KiB
14Wrong answer0/757ms26972 KiB
15Wrong answer0/761ms33872 KiB
16Wrong answer0/859ms28848 KiB
17Wrong answer0/859ms34508 KiB