题解
2024-11-30 09:41:38
发布于:浙江
8阅读
0回复
0点赞
#include <iostream>
using namespace std;
int main() {
int x, y, z;
cin >> x >> y >> z;
// 计算最多能购买的奖品数量
int num_items = y / x;
// 计算购买奖品后的剩余金额
int remaining_money = y - num_items * x;
// 判断剩余金额是否足够购买零食
if (remaining_money >= z) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return 0;
}
全部评论 2
good
2026-04-21 来自 北京
0ok
2026-04-21 来自 北京
0













有帮助,赞一个