DamSi

Untitled

Oct 28th, 2015
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.44 KB | None | 0 0
  1. __author__ = 'Damjan'
  2. import math
  3. # Zadaca 1
  4.  
  5. def A1(s):
  6.     #print math.e
  7.     if s>=60:
  8.         return 1.0
  9.     elif s<60:
  10.         return 1.0/pow(math.e,(60-abs(s)))
  11.     else:
  12.         return -1.0
  13.  
  14.  
  15. def A2(s):
  16.     #print math.e
  17.     if s<=10:
  18.         return 1.0
  19.     elif s>10:
  20.         return 1.0/(1+pow(math.e,abs(10-s)))
  21.     else:
  22.         return -1.0
  23.  
  24.  
  25. if __name__ == "__main__":
  26.     t=input()
  27.     print A1(t)
  28.     print A2(t)
Advertisement
Add Comment
Please, Sign In to add comment