Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- h, m=map(int, input().split())
- shift=h*60+m-330
- hres=0
- if shift%16:
- hres=((h*60+m-330)//16+1)*16
- else:
- hres=shift
- hres+=330
- hres%=1440
- hres//=60
- mres=0
- if shift%16:
- mres=((h*60+m-330)//16+1)*16
- else:
- mres=shift
- mres+=330
- mres%=1440
- mres%=60
- splt=""
- if mres<10:
- splt=":0"
- else:
- splt=":"
- print(str(hres)+splt+str(mres))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement