SORRY , I submitted the report carelessly.
here is my update version:
TIPS:
1.Before,I solve this problem. The regulation was found.
2.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.
C++
use the instruction,setw() and setprecision().
C
use the flag of printf, such as printf("%3.2lf");
2.the accuracy of double.
the more safety way is:use tow integer to input.
here is the following code:
//C++
int a,int b;char p;
while(cin>>a>>p>>b)
{
int x=a+100*b;
}
//C
int a,int b;char p;
while(scanf("%d.%d",&a,&b)!=EOF)
{
int x=a+100*b;
}