43792023-03-27 11:33:25DohajovDanielLeghosszabb nyaralás (75 pont)python3Wrong answer 3/7568ms34020 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+1)
main()
SubtaskSumTestVerdictTimeMemory
base3/75
1Accepted0/017ms10868 KiB
2Wrong answer0/065ms32180 KiB
3Wrong answer0/317ms11448 KiB
4Wrong answer0/317ms11720 KiB
5Accepted3/317ms11964 KiB
6Wrong answer0/317ms12248 KiB
7Wrong answer0/317ms12376 KiB
8Wrong answer0/417ms12416 KiB
9Wrong answer0/417ms12712 KiB
10Wrong answer0/517ms12756 KiB
11Wrong answer0/521ms14068 KiB
12Wrong answer0/521ms14692 KiB
13Wrong answer0/759ms17508 KiB
14Wrong answer0/761ms26784 KiB
15Wrong answer0/765ms33328 KiB
16Wrong answer0/868ms28940 KiB
17Wrong answer0/864ms34020 KiB