Advertisement
PedroPauloFO

Telefonia

Jun 4th, 2014
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. # coding: utf-8
  2. # Programacao 1, 2014.1 Pedro Paulo
  3. # Telefonia
  4.  
  5. tempo = int(raw_input())
  6.  
  7. if tempo <= 3:
  8.     preco = 1.00 + 0.5* tempo
  9.  
  10. elif tempo == 4:
  11.     preco = 3.20
  12.  
  13. else:
  14.     preco = ((tempo / 5)*3.00) + ((tempo % 5) * 0.70) + 1.00
  15.        
  16. print "R$ %.2f" % preco
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement