結果

問題 No.70 睡眠の重要性!
ユーザー yocto_sothothyocto_sothoth
提出日時 2020-07-28 21:46:17
言語 Ruby
(3.3.0)
結果
AC  
実行時間 87 ms / 5,000 ms
コード長 176 bytes
コンパイル時間 43 ms
コンパイル使用メモリ 11,180 KB
実行使用メモリ 15,308 KB
最終ジャッジ日時 2023-09-11 06:46:10
合計ジャッジ時間 1,207 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 87 ms
15,264 KB
testcase_01 AC 84 ms
15,036 KB
testcase_02 AC 81 ms
15,308 KB
testcase_03 AC 81 ms
15,180 KB
testcase_04 AC 82 ms
15,124 KB
testcase_05 AC 82 ms
15,088 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n = gets.to_i
sum = 0

n.times do
  (h_s, m_s), (h_w, m_w) = gets.split.map { |e| e.split(':').map(&:to_i) }
  sum += ((h_w * 60 + m_w) - (h_s * 60 + m_s)) % 1440
end

puts sum
0