Known w is an unsigned integer greater than 10 but not greater than 1000000, and if W is an integer of n (n≥2) bits, the number of the post-n-1 bits of W is calculated.

Source: Internet
Author: User

Describe

Known w is an unsigned integer greater than 10 but not greater than 1000000, and if W is an integer of n (n≥2) bits, the number of the post-n-1 bits of W is calculated.

Input
the first behavior, m, indicates the number of test data groups.
Next m lines, each row contains one test data.
Output
the output m line, the number of n-1 bits per line of the behavior (ignoring prefix 0). If the remaining bits are 0 except for the highest bit, the output is 0.
Sample input
4102359239231000
Sample output
23923230
My program:

#include <iostream>
#include <vector>
#include <cmath>
using namespace Std;
int main ()
{
int m;
unsigned int w;
cin>>m;
Vector<int> A, B;
for (int i=0;i<m;i++)
{
int x,y=0;
int k=0;
cin>>x;
while (X>10)
{
Y=y+x%10*pow (10,K);
X=X/10;
++k;
}
A.push_back (y);
}

for (int j=0;j<m;j++)
cout<<a[j]<<endl;
return 0;

}

The procedure of others:

#include <cstdlio>

intmain()

03. { 04. int  n,m; 05. scanf ( "%d" ,&n); 06. while (n--) 07. { 08. scanf ( "\n%*c%d" ,&m); 09. printf ( "%d\n" ,m); 10. } 11. }

Known w is an unsigned integer greater than 10 but not greater than 1000000, and if W is an integer of n (n≥2) bits, the number of the post-n-1 bits of W is calculated.

Related Keywords:
Related Article E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth \$300-1200 USD