| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 143013 | 冯祥瑞 | 02买铅笔 | C++ | Wrong Answer | 0 MS | 272 KB | 402 | 2026-01-11 17:45:00 |
#include <iostream> using namespace std; int main() { int a, b, c, d; cin >> a >> b >> c >> d; // 将价格和预算转换为分 int pencil_price = a * 100 + b; int budget = c * 100 + d; // 计算最多能买的铅笔数量 int max_pencils = budget / pencil_price; // 输出结果 cout << max_pencils << endl; return 0; }
------Input------
1 72 84 82
------Answer-----
11
------Your output-----
49