46102023-03-30 11:45:42SzorenyiZalanAndrasLeghosszabb nyaralás (75 pont)python3Wrong answer 16/7563ms34004 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/017ms11148 KiB
2Wrong answer0/063ms32240 KiB
3Wrong answer0/317ms11656 KiB
4Accepted3/317ms11824 KiB
5Accepted3/317ms11892 KiB
6Accepted3/317ms12044 KiB
7Wrong answer0/317ms12288 KiB
8Wrong answer0/417ms12336 KiB
9Wrong answer0/417ms12452 KiB
10Wrong answer0/517ms12492 KiB
11Wrong answer0/521ms14144 KiB
12Wrong answer0/521ms14920 KiB
13Accepted7/752ms17432 KiB
14Wrong answer0/757ms26808 KiB
15Wrong answer0/763ms33608 KiB
16Wrong answer0/861ms28744 KiB
17Wrong answer0/861ms34004 KiB