結果
| 問題 |
No.70 睡眠の重要性!
|
| コンテスト | |
| ユーザー |
wonda_t_coffee
|
| 提出日時 | 2020-01-29 22:54:37 |
| 言語 | Ruby (3.4.1) |
| 結果 |
AC
|
| 実行時間 | 89 ms / 5,000 ms |
| コード長 | 257 bytes |
| コンパイル時間 | 333 ms |
| コンパイル使用メモリ | 7,424 KB |
| 実行使用メモリ | 12,160 KB |
| 最終ジャッジ日時 | 2024-09-16 03:00:25 |
| 合計ジャッジ時間 | 1,216 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge6 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 |
コンパイルメッセージ
Syntax OK
ソースコード
def to_min(hhmm)
h, m = hhmm.split(':').map(&:to_i)
h * 60 + m
end
n = gets.chomp.to_i
ans = 0
n.times do
from, to = gets.chomp.split
m_from = to_min(from)
m_to = to_min(to)
m_to += 24*60 if m_to < m_from
ans += m_to - m_from
end
puts ans
wonda_t_coffee