43802023-03-27 11:35:02DohajovDanielLeghosszabb nyaralás (75 pont)python3Wrong answer 3/7568ms34536 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);jpenz=penz;mido=0
    print(mxido)
main()
SubtaskSumTestVerdictTimeMemory
base3/75
1Accepted0/017ms11084 KiB
2Wrong answer0/064ms32212 KiB
3Wrong answer0/317ms11432 KiB
4Wrong answer0/317ms11248 KiB
5Accepted3/317ms11480 KiB
6Wrong answer0/317ms11664 KiB
7Wrong answer0/317ms11792 KiB
8Wrong answer0/417ms12132 KiB
9Wrong answer0/417ms12128 KiB
10Wrong answer0/517ms12428 KiB
11Wrong answer0/521ms13732 KiB
12Wrong answer0/523ms14540 KiB
13Wrong answer0/756ms17304 KiB
14Wrong answer0/764ms26756 KiB
15Wrong answer0/768ms33444 KiB
16Wrong answer0/865ms29148 KiB
17Wrong answer0/864ms34536 KiB