#include <algorithm> #include <cstring> #include <iostream> #include <string> using namespace std; int mod(int a ,int b){ int tmp = a / b; return a - b * tmp; } int main() { int a, b; while(cin >> a >> b){ cout << mod(a,b) << endl; } } |
Double click to view unformatted code.