CSP-202012-1-期末预测之安全指数
CSP-202012-1-期末预测之安全指数
- 题目很简单,直接上代码
#include <iostream>
using namespace std;
int main() {
int n, sum = 0;
cin >> n;
for (int i = 0; i < n; i++)
{
int w, score;
cin >> w >> score;
sum += w * score;
}
if (sum > 0) cout << sum;
else cout << "0";
return 0;
}