Question
How can i solve this question from beecrowd problem 3037 in java without using arrays: John and Mary created their own version of darts, darts
How can i solve this question from beecrowd problem 3037 in java without using arrays:
John and Mary created their own version of darts, darts by distance. Each one throws 3 darts, choosing how far they will play from the target. In the normal game of darts, a number x is scored by the distance between where the dart hit and the center of the target. In the game of John and Mary it is punctuated xd where d is the distance betwen the shooter and the target.
John asks you to make an algorithm that gives the score given the distance of each turn, returns the winner
Input
The first line of the entry consists of a N number of test cases. In each test case there will be 6 lines, where the first 3 lines correspond to the pitches of John and the next 3 lines to the pitches of Mary. Each line of a test case consists of two numbers X and D where X is the score and D is the distance
Output
The output consists of the winner of each test case.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started