| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 142991 | 冯祥瑞 | 02买礼物 | C++ | Accepted | 0 MS | 260 KB | 511 | 2026-01-11 17:37:34 |
#include <iostream> using namespace std; int main() { // 定义常量 const int price_per_set = 220; // 每套保暖内衣价格 const int num_elders = 4; // 老人数量 const int total_money = 1000; // 爸妈带的钱 // 计算总花费 int total_spent = price_per_set * num_elders; // 计算剩余钱数 int remaining_money = total_money - total_spent; // 输出结果 cout << remaining_money << endl; return 0; }