fork download
  1. def strftime(seconds):
  2. p = 'AM'
  3. hour = seconds//3600
  4. if hour >= 12:
  5. hour -= 12
  6. p = 'PM'
  7. minutes = seconds%3600//60
  8. return '{h}:{m} {p}'.format(h=hour, m=minutes, p=p)
  9. print(strftime(50220))
Runtime error #stdin #stdout #stderr 0.02s 63016KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
  File "prog.py", line 1
    def strftime(seconds):
    ^
IndentationError: unexpected indent