#include<iostream>
using namespace std;
int main()
{
long long int n, r, q, m;
cin >> n;
while(n--)
{
r = q = m = 0;
cin >> m;
m = m * 567;
m = m/9;
m = m + 7492;
m = m * 235;
m = m/47;
m = m - 498;
while(q != 2)
{
r = m%10;
m = m/10;
q++;
}
if(r < 0)
{
r = r * (-1);
}
cout << r << endl;
}
return 0;
}
using namespace std;
int main()
{
long long int n, r, q, m;
cin >> n;
while(n--)
{
r = q = m = 0;
cin >> m;
m = m * 567;
m = m/9;
m = m + 7492;
m = m * 235;
m = m/47;
m = m - 498;
while(q != 2)
{
r = m%10;
m = m/10;
q++;
}
if(r < 0)
{
r = r * (-1);
}
cout << r << endl;
}
return 0;
}
Comments
Post a Comment