CSP-202012-1-期末预测之安全指数 解题代码 #include <iostream> #include <algorithm> using namespace std;int n, sum;int main() {cin >> n;for (int i = 0; i < n; i++){int w, s;cin >> w >> s;sum += w * s;}sum = max(sum, 0);cout << sum;return 0; }