Home > Back-end >  7-5 circle game (15 points)
7-5 circle game (15 points)

Time:11-16

# # 7-5 circle game (15 points)
jiajia is our ACM corporate vice President, she didn't feel yourself presence, so... One day allison and source of the processing in the play, he had his IQ is high, is playing a game master, they started to play the game, the rules of the game is that there is a long piece of rectangular panel x, y wide, two players want to play a circle on the drawing board, the center of the circle can randomly determined, each round is the radius r of the standard round (can you guess what is the TA freehand), round draw should be within the circle after coated with the color that oneself like, everyone took turns to draw circles, and on the drawing board of each circle can't overlap (tangent), if one party can't continue to draw, the other party won, self-effacing has always been the traditional virtues of our ACM laboratory, Yu Shichen had let allison, silly allison panic, she don't know I can win, and I don't know how to draw, so would you please to tell this to be abused jiajia,

input format:
Multiple sets of data, each group of data contains three integers, x, y, r (1 & lt;=x, y, r<=1000), x, y said length and the width of the rectangular panel, r said they can only draw a circle with a radius r

output format:
For each set of data, output if jiajia can win the game, "It is so easy!" , if jiajia lost and output It is boring! "" And each output a line,

input sample:
Given a set of input here, for example:

The
reference 2
5 56 7 4

Output sample:
Here is given the corresponding output, for example:

The
reference
It is so easy!
It is boring!


I don't know how to both sets of data output, because it is input, didn't want me to give a total of several groups of data to be imported, so I don't know what to do, but I will write a set of data, just don't know how to deal with this kind of didn't give a total of several groups of data to be imported question
The following is the code I wrote, but can only output the answer to the first set of data, hope god can tell:

 # include 
# define PI 3.14
Int main ()
{
Int x, y, r, s, s1, s2;
The scanf (" % d % d % d ", & amp; X, & amp; Y, & amp; R);
S=x * y;
S1=PI * r * r;
S2=s;
Int I=0, j=0;
While (s2 & gt; S1)
{
If (I=j)
{
S2=s1;
i++;
}
The else
{
S2=s1;
j++;
}
}
If (I & gt; J)
{
Printf (" It is so easy! \n");
}
The else
{
Printf (" It is boring! \n");
}
}
  • Related