Advertisement
Guest User

Untitled

a guest
May 26th, 2015
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.50 KB | None | 0 0
  1. n = int(input())
  2. sixty_tic = n//60
  3. one_tic = 0
  4. ten_tic = 0
  5. val_0 = sixty_tic*440
  6.  
  7. n = n%60
  8. if n == 0:
  9.     print(sixty_tic, 0, 0, val_0)
  10. else:
  11.     ten_tic = n//10
  12.     k = n%10
  13.  
  14.     if k*15 > 125:
  15.         ten_tic += 1
  16.         val = 125*ten_tic
  17.     else:
  18.         one_tic = k
  19.         val = 15*one_tic + 125*ten_tic
  20.     if val > 440:
  21.         sixty_tic += 1
  22.         ten_tic = 0
  23.         one_tic = 0
  24.         val_0 += 440
  25.     else:
  26.         val_0 += val
  27.     print(one_tic, ten_tic, sixty_tic)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement