思路:啊这,可不就是水题嘛,不过java菜狗连输入输出都要搜索┭┮﹏┭┮。
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int n = input.nextInt();
int ans = 0, x, y;
for(int i = 0; i < n; i ++){
x = input.nextInt();
y = input.nextInt();
ans += x*y;
}
System.out.println(Math.max(ans, 0));
}
}