Problems > The Final Exam > Editorial

The Final Exam — Solution & Editorial

Back to the Problem

Need total ≥ N·T, so answer = max(0, N·T − current sum), checked against 100 — all in integers.

Complexity: O(1) or O(log)