代码:
#include <bits/stdc++.h> using namespace std; int n; int y = 0; int main(){ cin >> n; for (int i = 1; i <= n; i++) { int w, score; cin >> w >> score; y += w * score; } cout << max(y, 0); }
代码:
#include <bits/stdc++.h> using namespace std; int n; int y = 0; int main(){ cin >> n; for (int i = 1; i <= n; i++) { int w, score; cin >> w >> score; y += w * score; } cout << max(y, 0); }