本题链接: 期末预测之安全指数
本博客给出本题截图:
C++
#include <iostream> #include <algorithm> using namespace std; int main() { int n; cin >> n; int res = 0; while (n -- ) { int s, w; cin >> s >> w; res += s * w; } cout << max(res, 0) << endl; return 0; }
总结
水题,不解释
本题链接: 期末预测之安全指数
本博客给出本题截图:
#include <iostream> #include <algorithm> using namespace std; int main() { int n; cin >> n; int res = 0; while (n -- ) { int s, w; cin >> s >> w; res += s * w; } cout << max(res, 0) << endl; return 0; }
水题,不解释