fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <math.h>
  4. #include <stdlib.h>
  5. int main() {
  6. int tc;
  7. scanf("%d",&tc);
  8. while(tc--){
  9. unsigned long long n,p;
  10. scanf("%llu%llu",&n,&p);
  11. printf("%llu\n",n%p);
  12. }
  13.  
  14.  
  15. /* Enter your code here. Read input from STDIN. Print output to STDOUT */
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0s 4372KB
stdin
1
8290826691135830692772803 95972011
stdout
21772228