Advertisement
simushin_pavel

Untitled

Dec 21st, 2020
661
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. h, m=map(int, input().split())
  2. shift=h*60+m-330
  3. hres=0
  4. if shift%16:
  5.     hres=((h*60+m-330)//16+1)*16
  6. else:
  7.     hres=shift
  8. hres+=330
  9. hres%=1440
  10. hres//=60
  11. mres=0
  12. if shift%16:
  13.     mres=((h*60+m-330)//16+1)*16
  14. else:
  15.     mres=shift
  16. mres+=330
  17. mres%=1440
  18. mres%=60
  19. splt=""
  20. if mres<10:
  21.     splt=":0"
  22. else:
  23.     splt=":"
  24. print(str(hres)+splt+str(mres))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement