Problem link : http://codeforces.com/problemset/problem/750/A

This problem requires you to count how many problems Limak can do in *240 – k *minutes.

One way I can think of is to manually count how many minutes Limak need to do 1 problem – 10 problems (t_{1} – t_{10}), and then based on the time left (*240 -k*), find how many problems he can solve. (Answer is *i* where *t _{i }*

*< 240 -k < t*

_{i+1})Or you can always simulate them. I did simulation and everything is smooth as silk.