太简单了,没啥好说的
n = int(input()) numSum = 0 for i in range(0, n): w, score = map(int, input().split()) numSum += w*score y = max(0, numSum) print(y)