/ * Reading question * /// 110 read as one hundred ten ten seconds, 101 read as a hundred and one need 4 seconds, 100 read as one hundred need 2 seconds #include
INT WORK (INT A, INT B) {INT M, N = B; for (m = a; m> 0; m -) {= == 0 ') IF (Number [M- 1]! = '0') n = 1; if (Number [M] <= '9' && Number [M]> '0') N = 2;} Return N;
Void main () {INT I, NUM; FPINPUT = FOPEN ("Input.txt", "R"); fpOutput = fopen ("Output.txt", "W"); while (! (fpinput))) {
FSCANF (FPINPUT, "% S", Number; for (i = 0; Number [i]! = '/ 0'; i ); Num = i; for (; Number [i] == '0'; i -); if (i! = NUM) {TIME = 0; TIME = Work (i, time);} else {time = 1; time = Work (i, time);} fprintf (fpoutput, "Result:% D / n ", time);} fclose (fpinput); fclose (fpoutput);