Advertisement
erfanul007

UVa 11547

Nov 20th, 2018
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4. long long int k,n,i;
  5. scanf("%lld",&k);
  6. for(i=1;i<=k;i++){
  7. scanf("%lld",&n);
  8. n=n*567;
  9. n=n/9;
  10. n=n+7492;
  11. n=n*235;
  12. n=n/47;
  13. n=n-498;
  14. n=n/10;
  15. n=n%10;
  16. if(n<0)
  17. n=-n;
  18. printf("%lld\n",n);
  19. }
  20. return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement