It is known that w is an unsigned integer greater than 10 but not greater than 1000000. If w is an integer n (n ≥ 2), the number of the last n-1 digits of w is obtained ., Known positive integer n greater than 30
Description
It is known that w is an unsigned integer greater than 10 but not greater than 1000000. If w is an integer n (n ≥ 2), the number of the last n-1 digits of w is obtained.
4102359239231000
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;
}
People's programs:
# Include <cstdlio>
int
main()
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.
}