← All problemsSign in

Sereja and Votes

CodeChefRating 1586Open on judge ↗

Sereja conducted a voting about N of his opinions. Ai percent of people voted for opinion number i. This statistics is called valid if sum of all Ai is equal to 100. Now let us define rounding up of a statistics A. - If Ai is not an integer, it will be rounded up to next integer. - Otherwise it will be left as it is. e.g. 4.1 became 5, 4.9 became 5 but 6 will still be 6. Now let us consider a

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start