Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
108986 汤奕硕 07苹果和虫子 C++ Wrong Answer 1 MS 272 KB 521 2025-01-23 21:09:16

Tests(0/10):


Code:

#include <iostream> using namespace std; int main() { int n, x, y; cin >> n >> x >> y; // 读取输入的三个正整数 // 计算虫子在y小时内能吃掉的苹果数 int eaten_apples = y / x; // 计算剩下的苹果数 int remaining_apples = n - eaten_apples; // 如果剩下的苹果数小于0,则输出0 if (remaining_apples < 0) { remaining_apples = 0; } cout << remaining_apples- 1 << endl; // 输出剩下的苹果数 return 0; }


Run Info:

------Input------
389 1 24
------Answer-----
365
------Your output-----
364