#include<bits/stdc++.h> long long doshok(long long x); using namespace std; int main() { long long x,total=0,t,print=0; cin>>t; while(t--){ cin>>x; total=(((((x*567)/9)+7492)*235)/47)-498; if(total<0) total*=(-1); print=doshok(total); cout<<print<<endl; } return 0; } long long doshok(long long x){ long long num=x , digit=0; num/=10; digit=num%10; return(digit); }
No comments:
Post a Comment