Title address: http://acm.nyist.edu.cn/JudgeOnline/problem.php?pid=96??
Description
knownWis a greater thanTenbut not greater than1000000An unsigned integer, ifWis aN (n≥2)The integer of the bit, then find outWThe Postn-1the number of bits.
input
First actMthat represents the number of test data groups.
NextMrow, each row contains one test data.
Output
OutputMrow, the corresponding row for each behaviorn-1Number of digits (Ignore prefix0). If except for the highest bit, the remaining bits are0, the output0.
Sample Input
4
1023
5923
923
1000
Sample Output
23
923
at0?? Code:?#include <stdio.h>
//process and Print results
Static void Handlerdata (int NUM);
int Main ()
{
??? int Readlen = 0;
??? scanf("%d", &readlen);
??? GetChar();
???
??? while (readlen>0)
??? {
??????? int num = 0;
??????? scanf("%d", &num);
??????? GetChar();
??????? Handlerdata(num);
???????
??????? --readlen;
??? }
???
??? return 0;}
//process and Print results
Static void Handlerdata (int num)
{
??? if (num <= Ten)
??? {
??????? return;
??? }
???
??? int index = 1;
??? int result = 0;
???
??? Do
??? {
??????? //gets the current last one
??????? int k = num% Ten;
??????? //10in-Process rounding
??????? Result + = k * INDEX;
??????? //10Rounding-Next Cycle Preparation
??????? index*=Ten;
??????? //Remove the bottom
??????? num = num/Ten;
??? } while (num > Ten);
???
??? printf("%d\n", result);}?
25- -25-n-1 digits of the introductory language