Chef has to attend an exam that starts in 𝑋X minutes, but of course, watching shows takes priority.Every episode of the show that Chef is watching, is 2424 minutes long.If he starts watching a new episode now, will he finish watching it strictly before the exam starts?Input FormatThe first line of input will contain a single integer 𝑇T, denoting the number of test cases.Each test case consists of one line of input, containing a single integer 𝑋X — the amount of time from now at which Chef's exam starts.Output FormatFor each test case, output on a new line the answer — YES if Chef will finish his episode before the exam starts, and NO otherwise.Each character of the output may be printed in either lowercase or uppercase, i.e, the string Yes, YES, yes, YeS` will all be treated as equivalent.Constraints1≤𝑇≤1001≤T≤1001≤𝑋≤1001≤X≤100Sample 1:InputOutput430236024YesNoYesNoExplanation:Test case 11: Chef has 3030 minutes of free time, which is easily enough to finish watching a 2424-minute episode. Hence, the answer is Yes.Test case 22: Chef has 2323 minutes of free time, which is not enough to finish watching a 2424-minute episode. Hence, the answer is No.Test case 33: Chef has 6060 minutes of free time, which is easily enough to finish watching a 2424-minute episode. Hence, the answer is Yes.Test case 44: Chef has 2424 minutes of free time. He will finish watching the episode exactly when the exam starts, and not strictly before it. Hence, the answer is No.
Question
Chef has to attend an exam that starts in 𝑋X minutes, but of course, watching shows takes priority.Every episode of the show that Chef is watching, is 2424 minutes long.If he starts watching a new episode now, will he finish watching it strictly before the exam starts?Input FormatThe first line of input will contain a single integer 𝑇T, denoting the number of test cases.Each test case consists of one line of input, containing a single integer 𝑋X — the amount of time from now at which Chef's exam starts.Output FormatFor each test case, output on a new line the answer — YES if Chef will finish his episode before the exam starts, and NO otherwise.Each character of the output may be printed in either lowercase or uppercase, i.e, the string Yes, YES, yes, YeS` will all be treated as equivalent.Constraints1≤𝑇≤1001≤T≤1001≤𝑋≤1001≤X≤100Sample 1:InputOutput430236024YesNoYesNoExplanation:Test case 11: Chef has 3030 minutes of free time, which is easily enough to finish watching a 2424-minute episode. Hence, the answer is Yes.Test case 22: Chef has 2323 minutes of free time, which is not enough to finish watching a 2424-minute episode. Hence, the answer is No.Test case 33: Chef has 6060 minutes of free time, which is easily enough to finish watching a 2424-minute episode. Hence, the answer is Yes.Test case 44: Chef has 2424 minutes of free time. He will finish watching the episode exactly when the exam starts, and not strictly before it. Hence, the answer is No.
Solution
This problem is about determining whether Chef has enough time to watch a 24-minute episode before his exam starts.
Here's how to solve it:
-
First, we need to know the number of test cases, which is given by the integer 𝑇.
-
For each test case, we are given a single integer 𝑋, which represents the amount of time from now at
Similar Questions
Chef has finally decided to complete all of his pending assignments.There are 𝑋X assignments where each assignment takes 𝑌Y minutes to complete.Find whether Chef would be able to complete all the assignments in 𝑍Z days.Input FormatThe first line of input will contain a single integer 𝑇T, denoting the number of test cases.Each test case consists three space-separated integers 𝑋,𝑌,X,Y, and 𝑍Z — the number of assignments, time taken in minutes to complete each assignment, and the number of days in which Chef wants to complete the assignments.Output FormatFor each test case, output on a new line, YES, if Chef would be able to complete all the assignments in 𝑍Z days. Otherwise, print NO.You may print each character of the string in uppercase or lowercase (for example, the strings YES, yEs, yes, and yeS will all be treated as identical).Constraints1≤𝑇≤1051≤T≤10 5 1≤𝑋,𝑌≤1001≤X,Y≤1001≤𝑍≤101≤Z≤10Sample 1:InputOutput35 5 550 80 220 72 1YESNOYESExplanation:Test case 11: Chef needs a total of 5⋅5=255⋅5=25 minutes to complete all the assignments. Thus, he would be able to complete the assignments in 55 days.Test case 22: Chef needs a total of 50⋅80=400050⋅80=4000 minutes to complete all the assignments. However, in 22 days, he only has 2⋅24⋅60=28802⋅24⋅60=2880 minutes.Thus, he would not be able to complete the assignments in 22 days.Test case 33: Chef needs a total of 20⋅72=144020⋅72=1440 minutes to complete all the assignments. In 11 days, he has 24⋅60=144024⋅60=1440 minutes.Thus, he would be able to complete the assignments in 11 day.
Chef wants to conduct a lecture for which he needs to set up an online meeting of exactly 𝑋X minutes.The meeting platform supports a meeting of maximum 3030 minutes without subscription and a meeting of unlimited duration with subscription.Determine whether Chef needs to take a subscription or not for setting up the meet.Input FormatFirst line will contain 𝑇T, the number of test cases. Then the test cases follow.Each test case contains a single integer 𝑋X - denoting the duration of the lecture.Output FormatFor each test case, print in a single line, YES if Chef needs to take the subscription, otherwise print NO.You may print each character of the string in uppercase or lowercase (for example, the strings YES, yEs, yes, and yeS will all be treated as identical).Constraints1≤𝑇≤1001≤T≤1001≤𝑋≤1001≤X≤100Sample 1:InputOutput45033080YESNONOYESExplanation:Test Case 11: Without subscription, the platform allows only 3030 minutes of duration. Since Chef needs to conduct a lecture of 5050 minutes, he needs to buy the subscription.Test Case 22: Without subscription, the platform allows 3030 minutes of duration. Since Chef needs to conduct a lecture of 33 minutes only, he does not need to buy the subscription.Test Case 33: Without subscription, the platform allows 3030 minutes of duration. Since Chef needs to conduct a lecture of 3030 minutes only, he does not need to buy the subscription.Test Case 44: Without subscription, the platform allows only 3030 minutes of duration. Since Chef needs to conduct a lecture of 8080 minutes, he needs to buy the subscription.
Chef is eagerly waiting for a piece of information. His secret agent told him that this information would be revealed to him after 𝐾K weeks.𝑋X days have already passed and Chef is getting restless now. Find the number of remaining days Chef has to wait for, to get the information.It is guaranteed that the information has not been revealed to the Chef yet.Input FormatThe first line of input will contain an integer 𝑇T — the number of test cases. The description of 𝑇T test cases follows.The first and only line of each test case contains two space-separated integers 𝐾K and 𝑋X, as described in the problem statement.Output FormatFor each test case, output the number of remaining days that Chef will have to wait for.Constraints1≤𝑇≤5001≤T≤5001≤𝐾≤101≤K≤101≤𝑋<7⋅𝐾1≤X<7⋅KSample 1:InputOutput41 51 61 11 22165Explanation:Test case 11: The information will be revealed to the Chef after 11 week, which is equivalent to 77 days. Chef has already waited for 55 days, so he needs to wait for 22 more days in order to get the information.Test case 22: The information will be revealed to the Chef after 11 week, which is equivalent to 77 days. Chef has already waited for 66 days, so he needs to wait for 11 more day in order to get the information.Test case 33: The information will be revealed to the Chef after 11 week, which is equivalent to 77 days. Chef has already waited for 11 day, so he needs to wait for 66 more days in order to get the information.Test case 44: The information will be revealed to the Chef after 11 week, which is equivalent to 77 days. Chef has already waited for 22 days, so he needs to wait for 55 more days in order to get the information.
Chef has recently moved into an apartment. It takes 3030 minutes for Chef to reach office from the apartment.Chef left for the office 𝑋X minutes before Chef was supposed to reach. Determine whether or not Chef will be able to reach on time.Input FormatThe first line of input will contain a single integer 𝑇T, denoting the number of test cases.Each test case consists of a single integer 𝑋X.Output FormatFor each test case, output YES if Chef will reach on time, NO otherwise.The output is case-insensitive. Thus, the strings YES, yes, yeS, and Yes are all considered the same.Constraints1≤𝑇≤601≤T≤601≤𝑋≤601≤X≤60Sample 1:InputOutput6306014293142YESYESNONOYESYESExplanation:Test case 1: Chef leaves 3030 minutes before he is supposed to reach, so he will reach the office exactly on time since it takes 3030 minutes to commute.Test case 2: Chef will reach 3030 minutes early.Test case 3: Chef will reach 16 minutes late.
Chef organised a 3030 kilometres marathon in Chefland.The participants receive medals on completing the marathon as following:If the total time taken is less than 33 hours, they receive a GOLD medal.If the total time taken is greater than equal to 33 hours but less than 66 hours, they receive a SILVER medal.If the total time taken is greater than equal to 66 hours, they receive a BRONZE medal.Chefina participated in the marathon and completed it in 𝑋X hours. Which medal would she receive?Input FormatThe input consists of a single integer 𝑋X — the number of hours Chefina took to complete the marathon.Output FormatOutput the medal Chefina would recieve.Note that you may print each character in uppercase or lowercase. For example, the strings GOLD, gold, Gold, and gOlD are considered the same.Constraints1≤𝑋≤101≤X≤10.Sample 1:InputOutput2GOLDExplanation:Chefina completed the marathon in less than 33 hours. Thus, she gets a GOLD medal.Sample 2:InputOutput5SILVERExplanation:Chefina took more than 33 but less than 66 hours. Thus, she gets a SILVER medal.Sample 3:InputOutput6BRONZEExplanation:Chefina took 66 hours to complete the marathon. Thus, she gets a BRONZE medal.
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.