fork download
  1. #include<iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. long long N, M, S;
  6.  
  7. cin >> M >> N;
  8.  
  9. if (M < 0 || M > 1000000000000){
  10. return 0;
  11. }
  12.  
  13. else if (N < 1 || N > 1000000000000){
  14. return 0;
  15. }
  16.  
  17. S = M % N;
  18.  
  19. cout << S << endl;
  20.  
  21. return 0;
  22. }
  23.  
Success #stdin #stdout 0.01s 5256KB
stdin
123 4567890
stdout
123