fork download
  1. #include <iostream>
  2. #include<cmath>
  3. using namespace std;
  4. int main() {
  5. // your code goes here
  6. int t,a,b,k;
  7. cin>>t;
  8. while(t--)
  9. {
  10. cin>>a>>b;
  11. k=a%b;
  12. cout<<k<<endl;
  13. }
  14. return 0;
  15. }
Success #stdin #stdout 0s 15224KB
stdin
Standard input is empty
stdout
Standard output is empty