43782023-03-27 11:32:36DohajovDanielLeghosszabb nyaralás (75 pont)python3Wrong answer 6/7568ms34004 KiB
def main():
    napdb,penz=[int(i) for i in input().split()]
    napL=[int(i) for i in input().split()]
    jpenz=penz
    mxido=0;mido=0
    for i in range(len(napL)):
        jpenz-=napL[i]
        mido+=1
        if jpenz==0 : mxido=max(mxido,mido);jpenz=penz;mido=0
        elif jpenz<0 : mxido=max(mxido,mido-1);jpenz=penz;mido=0
    print(mxido)
main()
SubtaskSumTestVerdictTimeMemory
base6/75
1Wrong answer0/017ms11008 KiB
2Wrong answer0/068ms32216 KiB
3Accepted3/317ms11692 KiB
4Wrong answer0/317ms11588 KiB
5Wrong answer0/317ms11928 KiB
6Wrong answer0/317ms11860 KiB
7Accepted3/317ms12308 KiB
8Wrong answer0/417ms12360 KiB
9Wrong answer0/417ms12436 KiB
10Wrong answer0/517ms12672 KiB
11Wrong answer0/521ms13820 KiB
12Wrong answer0/521ms14624 KiB
13Wrong answer0/757ms17292 KiB
14Wrong answer0/763ms26672 KiB
15Wrong answer0/768ms33268 KiB
16Wrong answer0/864ms28620 KiB
17Wrong answer0/864ms34004 KiB