222012026-01-14 17:47:00algoproBájital (80 pont)pypy3Wrong answer 12/8082ms31464 KiB
# UUID: 89428e05-aa86-49cc-a53b-f1a47c1d5671
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) // 2 #+ (d - c) % x
    print(c + h // 2)


SubtaskSumTestVerdictTimeMemory
base12/80
1Accepted0/039ms19388 KiB
2Wrong answer0/043ms19508 KiB
3Wrong answer0/243ms19524 KiB
4Wrong answer0/239ms19584 KiB
5Wrong answer0/246ms19692 KiB
6Wrong answer0/246ms21048 KiB
7Wrong answer0/457ms21600 KiB
8Wrong answer0/457ms21644 KiB
9Wrong answer0/279ms31144 KiB
10Wrong answer0/274ms31100 KiB
11Wrong answer0/268ms31044 KiB
12Wrong answer0/279ms31192 KiB
13Wrong answer0/268ms31092 KiB
14Wrong answer0/268ms31244 KiB
15Wrong answer0/278ms31256 KiB
16Wrong answer0/270ms31276 KiB
17Wrong answer0/279ms31188 KiB
18Wrong answer0/278ms31084 KiB
19Wrong answer0/267ms31052 KiB
20Wrong answer0/268ms31128 KiB
21Wrong answer0/268ms31252 KiB
22Wrong answer0/268ms31076 KiB
23Wrong answer0/445ms19524 KiB
24Accepted4/441ms19316 KiB
25Wrong answer0/439ms19436 KiB
26Accepted4/475ms31464 KiB
27Wrong answer0/479ms31304 KiB
28Wrong answer0/468ms31068 KiB
29Wrong answer0/476ms31140 KiB
30Accepted2/268ms31084 KiB
31Accepted2/282ms31108 KiB
32Wrong answer0/279ms31144 KiB
33Wrong answer0/271ms31068 KiB