Advertisement
NozdrachevNN

P_task_18

Dec 11th, 2019
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.81 KB | None | 0 0
  1. n = int(input())
  2. if (0 <= n):
  3.     if n == 86400:
  4.         print('0:00:00')
  5.     else:
  6.         if n > 86400:
  7.             while n >= 86400:
  8.                 n = (n - 86400)
  9.             if n < 86400:
  10.                 h = n // 3600
  11.                 m = ((n % 3600) // 60)
  12.                 if (m < 10):
  13.                     m = ('0' + str(m))
  14.                 s = ((n % 3600) % 60)
  15.                 if (s < 10):
  16.                     s = ('0' + str(s))
  17.                 print(str(h) + ':' + str(m) + ':'+ str(s))
  18.         else:
  19.             h = n // 3600
  20.             m = ((n % 3600) // 60)
  21.             if (m < 10):
  22.                 m = ('0' + str(m))
  23.             s = ((n % 3600) % 60)
  24.             if (s < 10):
  25.                 s = ('0' + str(s))
  26.             print(str(h) + ':' + str(m) + ':' + str(s))
  27. else:
  28.     not print
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement