■ 현재-ing/ㅡPython
Python 구글 Colaboratory #A310 미니 프로그램) 분시간을 환산
with seok
2022. 10. 10. 18:47
A310 |
# 분 단위로 입력된 시간을
# n일 m시간 o분으로 출력
_sec=int(input('환산할 몇 분? :'))
# 몫 print(_sec//60)
# 나머지 print(_sec%60)
# 시간:://60, 일:://(60*24)
_tool_day=60*24
_tool_hour=60
_day=_sec//_tool_day
_re_daysec=_sec%_tool_day
_hour=_re_daysec//_tool_hour
_re_hoursec=_re_daysec%_tool_hour
print(f'{_sec}초 = {_day}일 {_hour}시간 {_re_hoursec}초')
# 검산 print((_day*_tool_day)+(_hour*_tool_hour)+_re_hoursec)
728x90