85322024-01-21 15:05:53FarkasZénóBájital (80 pont)python3Accepted 80/80104ms52336 KiB
from sys import stdin
from functools import lru_cache

N, x = [int(x) for x in stdin.readline().split()]
kezdeti_hozzavalok = tuple(int(x) for x in stdin.readline().split())

xesek = egyesek = 0

for h in kezdeti_hozzavalok:
	xesek += h // x
	egyesek += h % x

if egyesek >= xesek:
	print(xesek)
else:
	xesek -= egyesek
	print((xesek * x) // (x + 1) + egyesek)
SubtaskSumTestVerdictTimeMemory
base80/80
1Accepted0/024ms11992 KiB
2Accepted0/023ms12524 KiB
3Accepted2/223ms12876 KiB
4Accepted2/221ms13128 KiB
5Accepted2/223ms13268 KiB
6Accepted2/223ms13628 KiB
7Accepted4/424ms14140 KiB
8Accepted4/424ms14252 KiB
9Accepted2/292ms36536 KiB
10Accepted2/290ms37756 KiB
11Accepted2/292ms38256 KiB
12Accepted2/294ms39092 KiB
13Accepted2/297ms39900 KiB
14Accepted2/292ms40600 KiB
15Accepted2/2104ms41616 KiB
16Accepted2/297ms42028 KiB
17Accepted2/290ms42892 KiB
18Accepted2/297ms43820 KiB
19Accepted2/293ms44624 KiB
20Accepted2/294ms45112 KiB
21Accepted2/293ms46176 KiB
22Accepted2/290ms47144 KiB
23Accepted4/421ms25084 KiB
24Accepted4/423ms25156 KiB
25Accepted4/421ms25264 KiB
26Accepted4/486ms40712 KiB
27Accepted4/496ms48172 KiB
28Accepted4/497ms49024 KiB
29Accepted4/4101ms49428 KiB
30Accepted2/294ms50216 KiB
31Accepted2/2100ms50712 KiB
32Accepted2/293ms51804 KiB
33Accepted2/294ms52336 KiB