#37036: python 解答


BensonDC (python戰士)

學校 : 不指定學校
編號 : 240921
來源 : [1.175.217.87]
最後登入時間 :
2024-03-27 12:33:26
b682. 2. 同學早安 -- 2015高雄市資訊學科能力競賽高中組 | From: [36.238.105.93] | 發表日期 : 2023-08-19 20:12

將時間轉成分鐘計算,能不用if就不要用

hh1,mm1=map(int,input().split())
hh2,mm2=map(int,input().split())
a = (((hh2*60+mm2)-(hh1*60+mm1))%1440)
b = [a//60,a%60]
print(*b)

 
ZeroJudge Forum