結果

問題 No.70 睡眠の重要性!
ユーザー Takuya NoguchiTakuya Noguchi
提出日時 2018-03-04 13:48:16
言語 Ruby
(3.3.0)
結果
AC  
実行時間 79 ms / 5,000 ms
コード長 284 bytes
コンパイル時間 61 ms
コンパイル使用メモリ 11,268 KB
実行使用メモリ 15,300 KB
最終ジャッジ日時 2023-09-21 21:21:34
合計ジャッジ時間 1,089 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
15,300 KB
testcase_01 AC 77 ms
15,288 KB
testcase_02 AC 76 ms
15,104 KB
testcase_03 AC 76 ms
15,208 KB
testcase_04 AC 76 ms
15,284 KB
testcase_05 AC 77 ms
15,060 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

gets
puts readlines.inject(0) { |sum, line|
  start_time, end_time = line.chomp.split
  start_hour, start_min = start_time.split(':').map(&:to_i)
  end_hour, end_min = end_time.split(':').map(&:to_i)

  sum + ((end_hour * 60 + end_min) - (start_hour * 60 + start_min) + 1440) % 1440
}
0