Knowee
Questions
Features
Study Tools

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.

Question

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.

...expand
๐Ÿง Not the exact question you are looking for?Go ask a question

Solution

The problem is asking to determine which medal Chefina would receive based on the number of hours she took to complete a marathon.

Here are the steps to solve this problem:

Similar Questions

Olympics 2024Athletes of Chefland have won ๐บG gold medals, ๐‘†S silver medals, and ๐ตB bronze medals in the Paris Olympics.Chef will be happy only if the Chefland team wins 55 medals of each type. Find the total number of additional medals the team needs to win to make Chef happy.Input FormatThe first and only line of input will contain three space-separated integers ๐บ,๐‘†,G,S, and ๐ตB โ€” the number of gold, silver, and bronze medals, respectively.Output FormatFor each test case, output on a new line, the total number of additional medals the team needs to win to make Chef happy.Constraints1โ‰ค๐บ,๐‘†,๐ตโ‰ค51โ‰คG,S,Bโ‰ค5Sample 1:InputOutput5 1 45

Long DriveChef and Chefina are out on a long road trip.The average speed of the car after 1010 hours of driving is ๐‘‹X kilometres per hour.Chef wants to achieve an average speed of ๐‘ŒY kilometres per hour. Given that he can travel a maximum of 100100 kilometres in one hour, find the minimum number of additional integer hours required for him to reach the target average speed.Input FormatThe first line of input will contain a single integer ๐‘‡T, denoting the number of test cases.Each test case consists of two space-separated integers ๐‘‹X and ๐‘ŒY โ€” the average speed after 1010 hours of driving and the required average speed.Output FormatFor each test case, output on a new line, the minimum number of integer hours required for him to reach the target average speed.Constraints1โ‰ค๐‘‡โ‰ค12251โ‰คTโ‰ค122550โ‰ค๐‘‹<๐‘Œ<10050โ‰คX<Y<100Sample 1:InputOutput350 5160 8055 9511080Explanation:Test case 11: The average speed after 1010 hours is 5050 kmph. This means that Chef has travelled a distance of 50โ‹…10=50050โ‹…10=500 kilometres. If he covers 6161 kilometres in the next hour, his average speed would be (500+61)(10+1)=51(10+1)(500+61)โ€‹ =51. Thus, he can achieve the target average speed in one hour.Test case 22: The average speed after 1010 hours is 6060 kmph. This means that Chef has travelled a distance of 60โ‹…10=60060โ‹…10=600 kilometres. If he covers 100100 kilometres each for the next 1010 hours, his average speed would be (600+100โ‹…10)(10+10)=80(10+10)(600+100โ‹…10)โ€‹ =80. Thus, he can achieve the target average speed in minimum of 1010 hours.

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.

On the occasion of Yoga Day, the only yoga instructor in Chefland, Chef, has received numerous queries.Chef has managed to free up ๐‘N hours from his busy schedule to conduct yoga sessions. There are two types of sessions that Chef offers:Type 11 session, which lasts 11 hour, and earns Chef ๐‘‹X rupees.Type 22 session, which lasts 22 hours, and earns Chef ๐‘Œย (๐‘Œ>๐‘‹)Yย (Y>X) rupees.Find the maximum amount of money Chef can earn in ๐‘N hours.Input FormatThe first line of input will contain a single integer ๐‘‡T, denoting the number of test cases.Each test case consists of three space-separated integers ๐‘,๐‘‹,๐‘ŒN,X,Y โ€” the number of hours for which Chef will take yoga sessions, price of type 11 session, and price of type 22 session respectively.Output FormatFor each test case, output on a new line, the maximum amount of money Chef can earn in ๐‘N hours.Constraints1โ‰ค๐‘‡โ‰ค10001โ‰คTโ‰ค10001โ‰ค๐‘โ‰ค10001โ‰คNโ‰ค10001โ‰ค๐‘‹<๐‘Œโ‰ค1001โ‰คX<Yโ‰ค100Sample 1:InputOutput34 5 73 1 25 2 620314Explanation:Test case 11: Chef will take type 11 sessions for all 44 hours. Thus, in 44 hours, he can take 44 sessions earning a total of 4โ‹…5=204โ‹…5=20 rupees.Test case 22: Chef will take one session of type 11 and one session of type 22. Thus, in 33 hours, he earns a total of 1โ‹…1+1โ‹…2=31โ‹…1+1โ‹…2=3 rupees.Test case 33: Chef will take one session of type 11 and two sessions of type 22. Thus, in 55 hours, he earns a total of 1โ‹…2+2โ‹…6=141โ‹…2+2โ‹…6=14 rupees.

Chef wants to run at least 10001000 meters to reach his fitness goal.There's a rectangular park nearby, with a length of ๐‘‹X meters and a width of ๐‘ŒY meters.Can Chef complete his goal by running one loop around the park? (Loop meaning running the entire path around the edge of the park.)Input FormatThe only line of input will contain 22 space-separated integers ๐‘‹X and ๐‘ŒY, the length and the width of the rectangular park.Output FormatPrint "YES" if Chef will be able to complete his fitness goal, otherwise print "NO" (without quotes).You may print each character of the output in either uppercase or lowercase (for example, the strings YES, yEs, yes, and yeS will all be treated as identical).Constraints1โ‰ค๐‘‹,๐‘Œโ‰ค10001โ‰คX,Yโ‰ค1000Sample 1:InputOutput400 100YESExplanation:The perimeter of the ground is (400+100+400+100)=1000๐‘š(400+100+400+100)=1000m which is sufficient to complete Chef's morning run.Sample 2:InputOutput300 150NOExplanation:The perimeter of the ground is (300+150+300+150)=900๐‘š(300+150+300+150)=900m which is not sufficient to complete Chef's morning run.

1/2

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.