TIPS:
1.First, I build a table to calculate all situations because if I didn't do that it will take a lots of time and I maybe not pass the CPE for "TIMELIMIT ERROR".
BE AWARE OF:
1.the format of output.
2.the accuracy of double.
the more safety way is:use tow integer to input.
here is the following code:
int a,int b;char p;
while(cin>>a>>p>>b)
{
}
TIPS:
1.First, I build a table to calculate all situations because if I didn't do that it will take a lots of time and I maybe not pass the CPE for "TIMELIMIT ERROR".
BE AWARE OF:
1.the format of output.
2.the accuracy of double.
the more safety way is:use tow integer to input.
here is the following code:
int a,int b;char p;
while(cin>>a>>p>>b)
{
}
簡單