212532026-01-12 17:30:02algoproBájital (80 pont)pypy3Wrong answer 0/80291ms31596 KiB
# UUID: b37a1dcd-ca78-478b-9747-7bd453def039
db, x=[int(i) for i in input().split()]
kész=0
ital=[int(i) for i in input().split()]
elég=True
if elég==True:
    for i in range(len(ital)):
        if ital[i]>=x:
            elég=True
            break
        else:
            elég=False
        if elég==False: break
    for i in range(len(ital)):
        if ital[i]<x and ital[i]>0:
            ital[i]-=1
            for j in range(i, len(ital)):
                if ital[j]>=x:
                    ital[j]-=x
                    kész+=1
                    break
    for i in range(len(ital)):
        if ital[i]>0:
            ital[i]-=1
            for j in range(i, len(ital)):
                if ital[j]>0:
                    ital[j]-=x
                    kész+=1
                    break
print(kész)
SubtaskSumTestVerdictTimeMemory
base0/80
1Accepted0/039ms19632 KiB
2Wrong answer0/045ms19920 KiB
3Wrong answer0/243ms19676 KiB
4Wrong answer0/239ms19756 KiB
5Wrong answer0/248ms21356 KiB
6Wrong answer0/250ms21248 KiB
7Wrong answer0/452ms21732 KiB
8Wrong answer0/450ms21680 KiB
9Wrong answer0/279ms30432 KiB
10Wrong answer0/279ms30420 KiB
11Wrong answer0/268ms30212 KiB
12Wrong answer0/270ms30360 KiB
13Wrong answer0/279ms30336 KiB
14Wrong answer0/281ms30380 KiB
15Wrong answer0/268ms30268 KiB
16Wrong answer0/278ms30460 KiB
17Wrong answer0/279ms30696 KiB
18Wrong answer0/270ms30444 KiB
19Wrong answer0/279ms30444 KiB
20Wrong answer0/270ms30380 KiB
21Wrong answer0/282ms30408 KiB
22Wrong answer0/279ms30360 KiB
23Wrong answer0/439ms19508 KiB
24Wrong answer0/437ms19436 KiB
25Wrong answer0/439ms19436 KiB
26Time limit exceeded0/4291ms31596 KiB
27Wrong answer0/479ms30360 KiB
28Wrong answer0/479ms30424 KiB
29Wrong answer0/468ms30444 KiB
30Wrong answer0/268ms30428 KiB
31Wrong answer0/279ms30444 KiB
32Wrong answer0/276ms30444 KiB
33Wrong answer0/275ms30304 KiB