Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main(int argc, char** argv) {
- int t,rest,coc;
- int n;
- scanf("%d",&t);
- while(t--){
- scanf("%d",&n);
- n=n*567;
- n=n/9;
- n=n+7492;
- n=n*235;
- n=n/47;
- n=n-498;
- int i=0;
- while(i<2){
- coc=n/10;
- rest=n%10;
- n=coc;
- i++;
- }
- if(rest<0) rest=0-rest;
- printf("%d\n",rest);
- }
- return (EXIT_SUCCESS);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement