fork download
  1. __author__ = 'Zlobober'
  2. n = int(raw_input())
  3. A = []
  4. P = []
  5. for i in range(n):
  6. a, p = map(int, raw_input().split())
  7. A.append(a)
  8. P.append(p)
  9. mn = 142
  10. ans = 0
  11. for i in range(n):
  12. mn = min(mn, P[i])
  13. ans += A[i] * mn
  14. print ans
Runtime error #stdin #stdout #stderr 0.01s 9016KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "prog.py", line 2, in <module>
EOFError: EOF when reading a line