結果

問題 No.70 睡眠の重要性!
ユーザー fshutofshuto
提出日時 2019-04-30 16:46:29
言語 Ruby
(3.3.0)
結果
AC  
実行時間 84 ms / 5,000 ms
コード長 227 bytes
コンパイル時間 175 ms
コンパイル使用メモリ 11,288 KB
実行使用メモリ 15,176 KB
最終ジャッジ日時 2023-08-28 21:33:57
合計ジャッジ時間 1,723 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
15,128 KB
testcase_01 AC 83 ms
15,032 KB
testcase_02 AC 84 ms
15,176 KB
testcase_03 AC 84 ms
15,080 KB
testcase_04 AC 83 ms
15,140 KB
testcase_05 AC 83 ms
15,104 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n = gets.to_i
ans = 0
n.times do 
  h1m1, h2m2 = gets.split
  h1, m1 = h1m1.split(":").map(&:to_i)
  h2, m2 = h2m2.split(":").map(&:to_i)
  ttt = (h2 + 24) * 60 + m2
  aaa = h1 * 60 + m1
  ans += (ttt - aaa) % 1440
end
puts ans
0