212462026-01-12 17:26:59algoproBájital (80 pont)pypy3Wrong answer 0/80291ms31628 KiB
# UUID: 3942410c-0d40-45c3-b0a0-e60bff480d89
bemenet=[int(i) for i in input().split()]
db=bemenet[0]
x=bemenet[1]
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
    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/039ms19424 KiB
2Wrong answer0/043ms19880 KiB
3Wrong answer0/239ms19864 KiB
4Wrong answer0/245ms19936 KiB
5Wrong answer0/250ms21044 KiB
6Wrong answer0/250ms21028 KiB
7Wrong answer0/452ms21688 KiB
8Wrong answer0/450ms21756 KiB
9Wrong answer0/270ms30236 KiB
10Wrong answer0/278ms30328 KiB
11Wrong answer0/268ms30316 KiB
12Wrong answer0/278ms30292 KiB
13Wrong answer0/279ms30284 KiB
14Wrong answer0/281ms30376 KiB
15Wrong answer0/268ms30432 KiB
16Wrong answer0/268ms30420 KiB
17Wrong answer0/270ms30452 KiB
18Wrong answer0/279ms30440 KiB
19Wrong answer0/268ms30436 KiB
20Wrong answer0/282ms30444 KiB
21Wrong answer0/281ms30424 KiB
22Wrong answer0/282ms30308 KiB
23Wrong answer0/439ms19584 KiB
24Wrong answer0/439ms19668 KiB
25Wrong answer0/439ms19436 KiB
26Time limit exceeded0/4291ms31628 KiB
27Wrong answer0/479ms30404 KiB
28Wrong answer0/481ms30352 KiB
29Wrong answer0/468ms30444 KiB
30Wrong answer0/279ms30444 KiB
31Wrong answer0/279ms30260 KiB
32Wrong answer0/268ms30428 KiB
33Wrong answer0/276ms30352 KiB