fork download
  1. A, B = map(int, input().split())
  2. C=int(input("필요시간"))
  3.  
  4. a=A*60+B+C
  5. min=a%60
  6. hour=a//60
  7. if hour>=24:
  8. hour=hour-24
  9. print(hour, min)
  10. else:
  11. print(hour, min)
Success #stdin #stdout 0.04s 9788KB
stdin
17 40
80
stdout
필요시간19 0