222022026-01-14 17:47:13algoproBájital (80 pont)pypy3Wrong answer 18/8093ms31480 KiB
# UUID: 91fff0ae-0e11-4d32-8a46-f7c323272eb7
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)


SubtaskSumTestVerdictTimeMemory
base18/80
1Accepted0/046ms19560 KiB
2Wrong answer0/046ms19496 KiB
3Wrong answer0/246ms19572 KiB
4Wrong answer0/246ms19508 KiB
5Wrong answer0/250ms19764 KiB
6Wrong answer0/248ms21164 KiB
7Wrong answer0/456ms21604 KiB
8Wrong answer0/459ms21396 KiB
9Accepted2/281ms31108 KiB
10Wrong answer0/274ms31236 KiB
11Wrong answer0/279ms31248 KiB
12Wrong answer0/271ms31212 KiB
13Wrong answer0/271ms31108 KiB
14Wrong answer0/286ms31288 KiB
15Wrong answer0/286ms31112 KiB
16Wrong answer0/272ms31168 KiB
17Wrong answer0/285ms31180 KiB
18Wrong answer0/271ms31216 KiB
19Wrong answer0/286ms31248 KiB
20Wrong answer0/286ms31284 KiB
21Wrong answer0/275ms31192 KiB
22Wrong answer0/274ms31296 KiB
23Wrong answer0/445ms19516 KiB
24Accepted4/448ms19320 KiB
25Wrong answer0/443ms19304 KiB
26Accepted4/487ms31480 KiB
27Wrong answer0/493ms31060 KiB
28Wrong answer0/472ms31072 KiB
29Wrong answer0/474ms31156 KiB
30Accepted2/293ms31104 KiB
31Accepted2/292ms31260 KiB
32Accepted2/272ms31068 KiB
33Accepted2/271ms31100 KiB