#include <iostream> using namespace std; int main() { int n,m; while(cin >>n>>m){ cout << n%m<<endl; } return 0; }
Double click to view unformatted code.