fork download
  1. #include<iostream>
  2. #include<algorithm>
  3. #include<string>
  4. using namespace std;
  5. int main(){
  6. string n, m;
  7. cin >> n >> m;
  8. int m1 = stoi(m);
  9. int n1 = stoi(n);
  10. cout << n1 / m1 << "\n" << n1 % m1;
  11. return 0;
  12. }
  13.  
  14.  
Runtime error #stdin #stdout #stderr 0.01s 5276KB
stdin
99999999999999999999999999999999999999999999999999999999999999999999999999 9999999999999999999999999999999999999
stdout
Standard output is empty
stderr
terminate called after throwing an instance of 'std::out_of_range'
  what():  stoi