Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
3212 | D班-罗炜翰 | 班级就餐 | C++ | 解答错误 | 0 | 0 MS | 252 KB | 592 | 2024-12-22 16:48:18 |
#include<iostream> using namespace std; int main() { int a,b,c,d = 0,e = 0,f = 0; cin>>a; while (a - 1) { cin>>b; while (b) { if (b >= 3) { d = b / 3; b -= d * 3; } else if (b >= 2) { e = b / 2; b -= e * 2; } else if (b >= 1) { f = b; b -= f; } c = d * 90 + e * 70 + f * 40; } a--; } }