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

Tests(3/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 << endl; // 输出剩下的苹果数 return 0; }


Run Info:

------Input------
459 2 1
------Answer-----
458
------Your output-----
459