Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
137441 whs 07苹果和虫子 C++ Accepted 1 MS 280 KB 454 2025-11-17 17:12:19

Tests(10/10):


Code:

#include <iostream> using namespace std; int main() { int n, x, y; cin >> n >> x >> y; int eaten_apples = 0; if (y % x == 0) { eaten_apples = y / x; } else { eaten_apples = y / x + 1; } int remaining_apples = n - eaten_apples; if (remaining_apples < 0) { remaining_apples = 0; } cout << remaining_apples << endl; return 0; }