线上OJ:
一本通: http://ybt.ssoier.cn:8088/problem_show.php?pid=1414 (opens in a new tab)
AcWing:https://www.acwing.com/problem/content/471/ (opens in a new tab)
题解代码:
#include <bits/stdc++.h>
using namespace std;
int main()
{
int a, b, c;
cin >> a >> b >> c;
int ans = int(a * 0.2 + b * 0.3 + c * 0.5); // 强制转换,防止编译器小数点问题
cout << ans << endl;
return 0;
}