Input format :The first line contains an integer 't' representing the number of test cases.Each test case consists of a single line with two space-separated integers 'x' and 'y', representing the scores of Sasha and Brenda, respectively, for a particular round.Output format :For each test case, the output prints the result of that round.If x is greater than y, the output prints "Sasha".If x is equal to y, the output prints "Tie".Otherwise, the output prints "Brenda"
Question
Input format :The first line contains an integer 't' representing the number of test cases.Each test case consists of a single line with two space-separated integers 'x' and 'y', representing the scores of Sasha and Brenda, respectively, for a particular round.Output format :For each test case, the output prints the result of that round.If x is greater than y, the output prints "Sasha".If x is equal to y, the output prints "Tie".Otherwise, the output prints "Brenda"
Solution
Sorry, but you didn't provide any text for me to respond to. Could you please provide the text?
Similar Questions
Alice has scored 𝑋X marks in her test and Bob has scored 𝑌Y marks in the same test. Alice is happy if she scored at least twice the marks of Bob’s score. Determine whether she is happy or not.Input FormatThe first and only line of input contains two space-separated integers 𝑋,𝑌X,Y — the marks of Alice and Bob respectively.Output FormatFor each testcase, print Yes if Alice is happy and No if she is not, according to the problem statement.The judge is case insensitive so you may output the answer in any case. In particular YES, yes, yEsare all considered equivalent toYes`.Constraints1≤𝑋,𝑌≤1001≤X,Y≤100Sample 1:InputOutput2 1YesExplanation:Alice has scored 𝑋=2X=2 marks whereas Bob has scored 𝑌=1Y=1 mark. As Alice has scored twice as much as Bob (i.e. 𝑋≥2𝑌X≥2Y), the answer is Yes.
The first line contains an integer, , the number of students.The subsequent lines describe each student over lines.- The first line contains a student's name.- The second line contains their grade.ConstraintsThere will always be one or more students having the second lowest grade.Output FormatPrint the name(s) of any student(s) having the second lowest grade in. If there are multiple students, order their names alphabetically and print each one on a new line.
In a coding contest, there are prizes for the top rankers. The prize scheme is as follows:Top 1010 participants receive rupees 𝑋X each.Participants with rank 1111 to 100100 (both inclusive) receive rupees 𝑌Y each.Find the total prize money over all the contestants.Input FormatFirst line will contain 𝑇T, number of test cases. Then the test cases follow.Each test case contains of a single line of input, two integers 𝑋X and 𝑌Y - the prize for top 1010 rankers and the prize for ranks 1111 to 100100 respectively.Output FormatFor each test case, output the total prize money over all the contestants.Constraints1≤𝑇≤10001≤T≤10001≤𝑌≤𝑋≤10001≤Y≤X≤1000Sample 1:InputOutput41000 1001000 100080 1400 30190001000008906700Explanation:Test Case 11: Top 1010 participants receive rupees 10001000 and next 9090 participants receive rupees 100100 each. So, total prize money =10⋅1000+90⋅100=19000=10⋅1000+90⋅100=19000.Test Case 22: Top 1010 participants receive rupees 10001000 and next 9090 participants receive rupees 10001000 each. So, total prize money =10⋅1000+90⋅1000=100000=10⋅1000+90⋅1000=100000.Test Case 33: Top 1010 participants receive rupees 8080 and next 9090 participants receive rupee 11 each. So, total prize money =10⋅80+90⋅1=890=10⋅80+90⋅1=890.Test Case 44: Top 1010 participants receive rupees 400400 and next 9090 participants receive rupees 3030 each. So, total prize money =10⋅400+90⋅30=6700=10⋅400+90⋅30=6700.
Chef and his girlfriend went on a date. Chef took 𝑋X dollars with him, and was quite sure that this would be enough to pay the bill. At the end, the waiter brought a bill of 𝑌Y dollars. Print "YES" if Chef has enough money to pay the bill, or "NO" if he has to borrow from his girlfriend and leave a bad impression on her.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 line of input, containing two space-separated integers 𝑋X and 𝑌Y.Output FormatFor each test case, output on a new line "YES" if Chef has enough money to pay the bill and "NO" otherwise.You may print each character of the string in either uppercase or lowercase (for example, the strings "yEs", "yes", "Yes" and "YES" will all be treated as identical).Constraints1≤𝑇≤1001≤T≤1001≤𝑋,𝑌≤1001≤X,Y≤100Sample 1:InputOutput41 11 22 150 100YESNOYESNOExplanation:Test case 11: Since the money Chef has is equal to the bill, he will be able to pay the bill.Test case 22: Since the money Chef has is less than the bill, he will have to borrow from his girlfriend and leave a bad impression on her.Test case 33: Since the money Chef has is greater than the bill, he will be able to pay the bill.Test case 44: Since the money Chef has is less than the bill, he will have to borrow from his girlfriend and leave a bad impression on her.
Input format :The first line of input will contain a single integer t, denoting the number of test cases.In each of the next t lines, the input consists of two space-separated integers X and Y representing the cost of Disposable Masks and Cloth Masks respectively.Output format :For each test case, the output displays "Cloth" if Ayan buys the cloth masks. Otherwise, the output displays "Disposable".
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.