43852023-03-27 11:48:35DohajovDanielLeghosszabb nyaralás (75 pont)python3Wrong answer 3/7570ms34216 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)):
        
        if jpenz>0: mido+=1;jpenz-=napL[i]
        if jpenz==0 :
            mxido=max(mxido,mido)
            jpenz=penz
            mido=0
        if jpenz<0 :
            mxido=max(mxido,mido)
            jpenz=penz
            mido=0
        
    print(mxido)
main()
SubtaskSumTestVerdictTimeMemory
base3/75
1Accepted0/017ms10840 KiB
2Wrong answer0/067ms32188 KiB
3Wrong answer0/317ms11308 KiB
4Wrong answer0/317ms11572 KiB
5Accepted3/317ms11964 KiB
6Wrong answer0/317ms11684 KiB
7Wrong answer0/317ms12136 KiB
8Wrong answer0/417ms12340 KiB
9Wrong answer0/417ms12476 KiB
10Wrong answer0/517ms12652 KiB
11Wrong answer0/523ms14300 KiB
12Wrong answer0/521ms15000 KiB
13Wrong answer0/759ms17732 KiB
14Wrong answer0/763ms27024 KiB
15Wrong answer0/770ms33500 KiB
16Wrong answer0/865ms28956 KiB
17Wrong answer0/870ms34216 KiB