HEU 5003 Total Amount
1 /**/ /* ************************************* 2 Problem: HEU 5003 Total Amount 3 Time: 0.0070 s 4 Memory: 244 k 5 Accepted Time: 2009-03-29 17:59:04 6 Tips: 高精度计算 7 ************************************* */ 8 #include < stdio.h > 9 #include < string .h > 10 void add( char * a, char * b, char * c) 11 { 12 int lena = strlen(a); 13 int lenb = strlen(b); 14 int lmax,lmin; 15 char * pmax, * pmin; 16 if (lena < lenb) 17 { 18 pmax = b;pmin = a;lmax = lenb;lmin = lena; 19 } 20 else 21 { 22 pmax = a;pmin = b;lmax = lena;lmin = lenb; 23 } 24 char * s = new char [lmax + 2 ]; 25 int i,j,k; 26 s[ 2 ] = '