签到题。
int n; int main() { cin>>n; int res=0; for(int i=0;i<n;i++) { int score,w; cin>>w>>score; res+=w*score; } cout<<max(res,0)<<endl; //system("pause"); return 0; }