#21872: UVA00147-update version


jayw711kb@gmail.com (Jay Huang)

學校 : 國立虎尾科技大學
編號 : 119439
來源 : [27.247.130.217]
最後登入時間 :
2020-09-15 15:55:19
d397. 00147 - Dollars -- UVa147 | From: [27.242.137.172] | 發表日期 : 2020-07-28 16:08

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;

}

 
ZeroJudge Forum