2530 : 인공지능 시계#
브론즈 4
시간 제한 |
메모리 제한 |
정답 비율 |
---|---|---|
1초 |
128MB |
46.383% |
input#
초 단위로 오븐 구이가 끝나는 시간을 구하는 것을 구해라
첫번째 줄 : 현재 시각 시,분,초
두번째 줄 : 요리하는데 필요한 시간
# input setting
problem_num = 2530
import os, sys
path = os.getcwd() + f'\\txt\\{problem_num}' + '.txt'
sys.stdin = open(path,'r')
start_time = list(map(int,sys.stdin.readline().split()))
need_time = int(sys.stdin.readline().strip())
# def
import datetime
def oven_clock(start, need):
start_datetime = datetime.datetime(2023,1,1,hour=start[0], minute=start[1], second=start[2])
spend_datetime = datetime.timedelta(seconds=need)
output_datetime = start_datetime + spend_datetime
return output_datetime.hour, output_datetime.minute, output_datetime.second
a,b,c = oven_clock(start_time, need_time)
print(a,b,c)
14 33 20