본문 바로가기
프로그램

[파이썬] 문제 : 입력된 sec(초)로 시간,분,초 계산(math floor함수)

by 오디세이99 2023. 4. 1.
728x90
반응형

import math

Sec = int(input('input Second : '))
Hour = math.floor(Sec/3600)
Na = Sec%3600
Minute = math.floor(Na/60)
Second = Na%60
print(f"{Hour}H, {Minute}M, {Second}S")

728x90
반응형

댓글