fork download
  1. import math
  2. thoi_gian_con_lai=30
  3. t_tk=20+273.15
  4. while True:
  5. try:
  6. for i in range(5):
  7. t_C=float(input())
  8. t=t_C+273.15
  9. T_ut=thoi_gian_con_lai*math.exp((70000/8.314)*((1/t)-(1/t_tk)))
  10. if T_ut<=0:
  11. print("Sản phẩm đã hỏng")
  12. break
  13. else:
  14. thoi_gian_con_lai=T_ut
  15. print(f"Thời gian sử dụng còn lại là {T_ut:.1f}")
  16. except EOFError:
  17. break
Success #stdin #stdout 0.11s 14232KB
stdin
12
stdout
Thời gian sử dụng còn lại là 67.2