Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
51703 zhangsicun 谁拿了最多奖学金 C++ 解答错误 0 MS 248 KB 1081 2024-09-24 22:23:51

Tests(0/10):


#include<bits/stdc++.h> using namespace std; int main(){ int numbers, score, classscore, articles, sum; int mostmn = 0; int all = 0; char name, yes1, yes2, nbest; cin >> numbers; for(int i = 0;i < numbers;i++){ sum = 0; cin >> name >> score >> classscore >> yes1 >> yes2 >> articles; if(score > 80){ if(articles > 0){ all += 8000; sum += 8000; } }if(score > 85){ if(classscore > 80){ all += 4000; sum += 4000; } }if(score > 90){ all += 2000; sum += 2000; }if(score > 85){ if(yes2 == 'Y'){ all += 1000; sum += 1000; } }if(classscore > 80){ if(yes1 == 'Y'){ all += 8000; sum += 8000; } } if(sum > mostmn){ mostmn = sum; nbest = name; } } cout << name << endl << mostmn << endl << all; }


测评信息: