Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
104700 | 彭士宝 | 07苹果和虫子 | C++ | Wrong Answer | 1 MS | 276 KB | 451 | 2025-01-08 20:11:09 |
#include <iostream> using namespace std; int main() { int n, x, y; cin >> n >> x >> y; // 读取苹果的数量n,虫子吃苹果的速度x,以及总时间y // 如果虫子在给定时间内能吃完所有苹果,则剩下0个苹果 if (n <= y) { cout << 0 << endl; } else { // 否则,剩下的苹果数量为n减去虫子吃掉的数量 cout << n - y << endl; } return 0; }
------Input------
290 4 8
------Answer-----
288
------Your output-----
282