221952026-01-14 17:44:00algoproBájital (80 pont)pypy3Wrong answer 12/8079ms31432 KiB
# UUID: fca82cca-4f45-4894-8f10-c926944e8e02
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/039ms19544 KiB
2Wrong answer0/039ms19620 KiB
3Wrong answer0/243ms19656 KiB
4Wrong answer0/245ms19632 KiB
5Wrong answer0/245ms19692 KiB
6Wrong answer0/245ms21084 KiB
7Wrong answer0/446ms21532 KiB
8Wrong answer0/454ms21400 KiB
9Wrong answer0/275ms31300 KiB
10Wrong answer0/265ms31204 KiB
11Wrong answer0/264ms31080 KiB
12Wrong answer0/274ms31092 KiB
13Wrong answer0/275ms31244 KiB
14Wrong answer0/275ms31300 KiB
15Wrong answer0/265ms31092 KiB
16Wrong answer0/274ms31116 KiB
17Wrong answer0/264ms31208 KiB
18Wrong answer0/275ms31248 KiB
19Wrong answer0/274ms31200 KiB
20Wrong answer0/275ms31304 KiB
21Wrong answer0/268ms31236 KiB
22Wrong answer0/275ms31248 KiB
23Wrong answer0/445ms19464 KiB
24Accepted4/443ms19540 KiB
25Wrong answer0/443ms19320 KiB
26Accepted4/472ms31432 KiB
27Wrong answer0/465ms31236 KiB
28Wrong answer0/479ms31264 KiB
29Wrong answer0/476ms31264 KiB
30Accepted2/270ms31252 KiB
31Accepted2/265ms31076 KiB
32Wrong answer0/279ms31220 KiB
33Wrong answer0/274ms31060 KiB