Boxing King 2002 is a very classic fighting game, the main process is that both sides choose a role to attack each other until one side of the blood volume of 0, the other side can win. Here we simplify the process, from the left crazy eight gods first attack, and then to the right Gishoward again attack. Then loop until the end of the 0 game for one side of the blood volume.
Now tell you crazy eight-god and Gishoward two-party characters ' respective health values and attack damage. Can you tell me if it's a crazy eight-god victory or a Gishoward?
Input: Only 1 lines, total four integers. The first two integers represent the insane eight gods ' health and attack damage, followed by two
The integer represents the health value and attack damage of Jimmy Howard.
Output: Left or right,left means crazy eight-god victory, right means that Jimmy Howard wins.
#include "stdio.h"
int main ()
{
int a,a1,b,b1;
scanf ("%d%d%d%d", &A,&A1,&B,&B1);
if (A/B1>B/A1)
printf ("left\n");
else if (A/B1<B/A1)
{
if ((A%B1) && (b%a1==0))
printf ("left\n");
else if ((a%b1==0) && (B%A1))
printf ("right\n");
Else
printf ("right\n");
}
else if (A/B1==B/A1)
{
if ((A%B1) && (b%a1==0))
printf ("left\n");
else if ((a%b1==0) && (B%A1))
printf ("right\n");
Else
printf ("left\n");
}
return 0;
}
1002 Boxing King