結果

問題 No.70 睡眠の重要性!
ユーザー iad_2889iad_2889
提出日時 2019-05-06 09:56:35
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 16 ms / 5,000 ms
コード長 384 bytes
コンパイル時間 235 ms
コンパイル使用メモリ 10,572 KB
実行使用メモリ 7,968 KB
最終ジャッジ日時 2023-09-09 11:06:04
合計ジャッジ時間 996 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,780 KB
testcase_01 AC 15 ms
7,868 KB
testcase_02 AC 15 ms
7,884 KB
testcase_03 AC 16 ms
7,968 KB
testcase_04 AC 15 ms
7,820 KB
testcase_05 AC 16 ms
7,780 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def get_sleeping_time(start:str,end:str):
    start = time_to_minutes(start)
    end = time_to_minutes(end)
    st = end - start
    if st < 0:
        st+=24 * 60
    return st

def time_to_minutes(_time:str):
    h,m = map(int,_time.split(":"))
    return h * 60 + m

N = int(input())
sleeping_time = [get_sleeping_time(*input().split()) for x in range(N)]
print(sum(sleeping_time))
0