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}')

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}')

Refactor python version of Simple Calculate
Refactor python version of Simple Calculate

  import sys
  
  s = 0.0
  
  for line in sys.stdin:
-     a, b, c = line.split()
+     _, b, c = line.split()
-     a, b, c = int(a), int(b), float(c)
+     b, c = int(b), float(c)
      s += c * b
  
  print(f'VALOR A PAGAR: R$ {s:.2f}')
  
Refactor python version of Simple Calculate
## Code Before:
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}')

## Instruction:
Refactor python version of Simple Calculate
## Code After:
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}')
