解题代码
cpp
#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;
}