Advertisement
Alex-Flexer

Untitled

Feb 25th, 2025
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.50 KB | None | 0 0
  1. time = input()
  2.  
  3. h, m = time.split(":")
  4. h, m = int(h), int(m)
  5. rh = int(h % 10 * 10 + h // 10)
  6. rm = int(m % 10 * 10 + m // 10)
  7.  
  8. if 6 <= h <= 9:
  9.     print("10:01")
  10. elif 16 <= h <= 19:
  11.     print("20:02")
  12. else:
  13.     if rh >= m:
  14.         print(f"{'' if h >= 10 else '0'}{h}:{'' if rh + 1 > 10 else '0'}{rh}")
  15.     elif rh + 10 < 60:
  16.         if h + 1 < 24:
  17.             print(f"{'' if h + 1 >= 10 else '0'}{h + 1}:{rh + 10}")
  18.         else:
  19.             print("00:00")
  20.     else:
  21.         print("20:02")
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement