結果
問題 | No.70 睡眠の重要性! |
ユーザー | te-sh |
提出日時 | 2017-01-23 17:01:50 |
言語 | D (dmd 2.106.1) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 410 bytes |
コンパイル時間 | 632 ms |
コンパイル使用メモリ | 88,464 KB |
実行使用メモリ | 4,380 KB |
最終ジャッジ日時 | 2023-09-03 00:48:24 |
合計ジャッジ時間 | 1,323 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
4,376 KB |
testcase_01 | AC | 1 ms
4,380 KB |
testcase_02 | AC | 2 ms
4,380 KB |
testcase_03 | AC | 1 ms
4,380 KB |
testcase_04 | AC | 1 ms
4,376 KB |
testcase_05 | AC | 1 ms
4,380 KB |
ソースコード
import std.algorithm, std.conv, std.range, std.stdio, std.string; void main() { auto n = readln.chomp.to!size_t; auto r = 0; foreach (_; n.iota) { auto rd = readln.split, a = toMin(rd[0]), b = toMin(rd[1]); auto c = b - a; if (c < 0) c += 24 * 60; r += c; } writeln(r); } auto toMin(string a) { auto hm = a.split(":"), h = hm[0].to!int, m = hm[1].to!int; return h * 60 + m; }