結果

問題 No.70 睡眠の重要性!
ユーザー code-devocode-devo
提出日時 2016-01-06 15:30:15
言語 Ruby
(3.3.0)
結果
AC  
実行時間 93 ms / 5,000 ms
コード長 192 bytes
コンパイル時間 59 ms
コンパイル使用メモリ 11,948 KB
実行使用メモリ 16,084 KB
最終ジャッジ日時 2023-10-19 16:08:14
合計ジャッジ時間 1,329 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 91 ms
16,084 KB
testcase_01 AC 93 ms
16,084 KB
testcase_02 AC 88 ms
16,084 KB
testcase_03 AC 88 ms
16,084 KB
testcase_04 AC 87 ms
16,084 KB
testcase_05 AC 92 ms
16,084 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

gets

sum = 0
while line = gets do
  h1, m1, h2, m2 = line.scan(/\d+/).map(&:to_i)
  min1 = h1 * 60 + m1
  min2 = h2 * 60 + m2
  min2 += 1440 if min2 < min1
  sum += min2 - min1
end

puts sum
0