Dropped Frames

Easy · rating 1000 · Arrays

A game targets fps frames per second, so each frame's budget is 1000 / fps milliseconds. The first line has n and fps. The second line has n frame times in milliseconds. Print how many frames missed the budget (took strictly longer than 1000 / fps ms).

Constraints: 1 ≤ n ≤ 105, 1 ≤ fps ≤ 1000

Related problems

Open Dropped Frames in Code Arena →