221912026-01-14 17:42:41algoproBájital (80 pont)pypy3Wrong answer 12/8076ms31584 KiB
# UUID: aa723e6a-6387-431d-92ac-36497e1aae3f
n , x = [int(x) for x in input().split()]
a = [int(x) for x in input().split()]
#a.sort()
#b = []
c = 0
d = 0
for i in range(n):
    if a[i] >= x:
        #b.append((a[i] // x))
        d += a[i] // x
        c += a[i] % x
    else:
        c += a[i]
if(c >= d):
    print(d)
else:
    h = (d - c) // x #+ (d - c) % x
    print(c + h)


SubtaskSumTestVerdictTimeMemory
base12/80
1Accepted0/043ms19364 KiB
2Wrong answer0/039ms19684 KiB
3Wrong answer0/241ms19416 KiB
4Wrong answer0/237ms19676 KiB
5Wrong answer0/239ms19648 KiB
6Wrong answer0/243ms21072 KiB
7Wrong answer0/454ms21432 KiB
8Wrong answer0/452ms21592 KiB
9Wrong answer0/275ms31100 KiB
10Wrong answer0/265ms31056 KiB
11Wrong answer0/264ms31216 KiB
12Wrong answer0/276ms31284 KiB
13Wrong answer0/267ms31104 KiB
14Wrong answer0/275ms31256 KiB
15Wrong answer0/275ms31308 KiB
16Wrong answer0/265ms31144 KiB
17Wrong answer0/265ms31212 KiB
18Wrong answer0/274ms31148 KiB
19Wrong answer0/265ms31124 KiB
20Wrong answer0/274ms31176 KiB
21Wrong answer0/276ms31212 KiB
22Wrong answer0/264ms31212 KiB
23Wrong answer0/437ms19400 KiB
24Accepted4/443ms19324 KiB
25Wrong answer0/439ms19436 KiB
26Accepted4/472ms31584 KiB
27Wrong answer0/465ms31212 KiB
28Wrong answer0/475ms31248 KiB
29Wrong answer0/465ms31208 KiB
30Accepted2/276ms31208 KiB
31Accepted2/268ms31224 KiB
32Wrong answer0/276ms31280 KiB
33Wrong answer0/265ms31216 KiB