import sys

s = 0.0

for line in sys.stdin:
    _, b, c = line.split()
    b, c = int(b), float(c)
    s += c * b

print(f'VALOR A PAGAR: R$ {s:.2f}')

import sys

s = 0.0

for line in sys.stdin:
    a, b, c = line.split()
    a, b, c = int(a), int(b), float(c)
    s += c * b

print(f'VALOR A PAGAR: R$ {s:.2f}')

--- 
+++ 
@@ -3,8 +3,8 @@
 s = 0.0
 
 for line in sys.stdin:
-    a, b, c = line.split()
-    a, b, c = int(a), int(b), float(c)
+    _, b, c = line.split()
+    b, c = int(b), float(c)
     s += c * b
 
 print(f'VALOR A PAGAR: R$ {s:.2f}')
Refactor python version of Simple Calculate
