http://118.190.20.162/view.page?gpid=T123
9分钟 100分

#include <iostream>
#include <cstdio>
#include <cstring>
#include <string>

using namespace std;


int main(){
   
    int n;
    scanf("%d", &n);
    long long sum = 0;
    int w, score;
    while(n--){
   
    	scanf("%d%d", &w, &score);
    	sum += w * score;
	}
	if(sum > 0){
   
		cout << sum << endl;
	}else{
   
		cout << 0 << endl;
	}
    return 0; 
}