303891: CF750A. New Year and Hurry
Memory Limit:256 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
New Year and Hurry
题意翻译
Limak有n个任务,完成时间分别为1×5,2×5,……,n×5。而Limak走到他朋友家需要k分钟。问他在4小时内在确保能到达朋友家的同时最多能做多少任务。题目描述
Limak is going to participate in a contest on the last day of the 2016. The contest will start at 20:00 and will last four hours, exactly until midnight. There will be $ n $ problems, sorted by difficulty, i.e. problem $ 1 $ is the easiest and problem $ n $ is the hardest. Limak knows it will take him $ 5·i $ minutes to solve the $ i $ -th problem. Limak's friends organize a New Year's Eve party and Limak wants to be there at midnight or earlier. He needs $ k $ minutes to get there from his house, where he will participate in the contest first. How many problems can Limak solve if he wants to make it to the party?输入输出格式
输入格式
The only line of the input contains two integers $ n $ and $ k $ ( $ 1<=n<=10 $ , $ 1<=k<=240 $ ) — the number of the problems in the contest and the number of minutes Limak needs to get to the party from his house.
输出格式
Print one integer, denoting the maximum possible number of problems Limak can solve so that he could get to the party at midnight or earlier.
输入输出样例
输入样例 #1
3 222
输出样例 #1
2
输入样例 #2
4 190
输出样例 #2
4
输入样例 #3
7 1
输出样例 #3
7