https://codeforc.es/group/vFwRVj9WjO/contest/325796/problem/A

#include <iostream>
using namespace std;
int main()
{
long long ans1 = 0;
long long ans2 = 0;
for(int i = 1; i <= 5; i++){
long long tmp;
cin >> tmp;
ans1 += tmp;
}
for(int i = 1; i <= 5; i++){
long long tmp1;
cin >> tmp1;
ans2 += tmp1;
}
// cout << ans1 << endl;
// cout << ans2 << endl;
if(ans1 >= ans2) cout << "Blue";
else cout << "Red";
return 0;
}
这是一个简单的编程竞赛问题,程序读取两组各五个整数,然后计算每组的总和。如果第一组的总和大于等于第二组,程序输出Blue,否则输出Red。该程序涉及基本的输入输出操作和简单的数学比较。
739

被折叠的 条评论
为什么被折叠?



