結果
問題 | No.70 睡眠の重要性! |
ユーザー |
![]() |
提出日時 | 2016-07-23 09:02:15 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 34 ms / 5,000 ms |
コード長 | 801 bytes |
コンパイル時間 | 336 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-11-06 14:46:05 |
合計ジャッジ時間 | 916 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 |
ソースコード
# -*- coding: utf-8 -*-# n = int(input())import datetimetoday = datetime.datetime.now()tomorrow = today + datetime.timedelta(days=1)n = int(input())seconds = 0for i in range(n):s, e = [j for j in input().split()]sh, sm = [int(j) for j in s.split(":")]eh, em = [int(j) for j in e.split(":")]if datetime.time(sh, sm) <= datetime.time(eh, em):start = datetime.datetime(today.year, today.month, today.day, sh, sm, 0)end = datetime.datetime(today.year, today.month, today.day, eh, em, 0)else:start = datetime.datetime(today.year, today.month, today.day, sh, sm, 0)end = datetime.datetime(tomorrow.year, tomorrow.month, tomorrow.day, eh, em, 0)delta = end - startseconds += delta.total_seconds()print( int(seconds / 60) )