43822023-03-27 11:38:49DohajovDanielLeghosszabb nyaralás (75 pont)python3Wrong answer 6/7570ms34004 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]
        if jpenz>0: mido+=1
        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
base6/75
1Wrong answer0/017ms11112 KiB
2Wrong answer0/068ms32124 KiB
3Accepted3/317ms11644 KiB
4Wrong answer0/317ms11688 KiB
5Wrong answer0/317ms11812 KiB
6Wrong answer0/317ms12208 KiB
7Accepted3/317ms11948 KiB
8Wrong answer0/417ms12236 KiB
9Wrong answer0/417ms12296 KiB
10Wrong answer0/517ms12572 KiB
11Wrong answer0/520ms14028 KiB
12Wrong answer0/523ms14820 KiB
13Wrong answer0/759ms17308 KiB
14Wrong answer0/761ms26796 KiB
15Wrong answer0/770ms33536 KiB
16Wrong answer0/867ms28960 KiB
17Wrong answer0/865ms34004 KiB