Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
3219 D班-罗炜翰 班级就餐 C++ 解答错误 0 1 MS 252 KB 610 2024-12-22 16:53:21

Tests(0/7):


#include<iostream> using namespace std; int main() { int a,b,c,d = 0,e = 0,f = 0; cin>>a; while (a) { 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; } cout<<c<<endl; a--; } }


测评信息: