知识点:运算
#include <iostream> using namespace std; int main() { int n = 0; int h = 0; int m = 0; int res = 0; cin >> n >> h >> m; m = (m % h == 0) ? m : m + h; res = n - m / h ; cout << res; return 0; }
知识点:运算
#include <iostream> using namespace std; int main() { int n = 0; int h = 0; int m = 0; int res = 0; cin >> n >> h >> m; m = (m % h == 0) ? m : m + h; res = n - m / h ; cout << res; return 0; }