본문 바로가기
Beakjoon&프로그래머스/파이썬

[백준/파이썬]13528번 Grass Seed Inc.

by 현장 2021. 4. 15.

-코드

m = float(input())
l = int(input())
r = 0

for i in range(l):
    a, b = list(map(float, input().split()))
    r += a * b

print("%.7f" % float(r * m))