Advertisement
Guest User

Untitled

a guest
Jan 25th, 2020
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. a = list(map(int, input().split()[:24]))
  2.  
  3. litre_92_price = 0
  4. litre_95_price = 0
  5.  
  6. for i in range(1, 12, 2):
  7.     litre_92_price += a[i] / a[i - 1]
  8.  
  9. for i in range(12, 24, 2):
  10.     litre_95_price += a[i] / a[i - 1]
  11.  
  12. litre_92_price /= 6
  13. litre_95_price /= 6
  14.  
  15. print(litre_92_price)
  16. print(litre_95_price)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement