Problem link
#include <iostream>
#include <cmath>
#include <cstdlib>
using namespace std;
int main() {
int ntest,n;
cin >> ntest;
for (int test=1; test<=ntest; test++)
{
cin >> n;
int result = (n*63 + 7492)*5 - 498;
result /= 10;
cout << abs(result%10) << endl;
}
return 0;
}
No comments:
Post a Comment