結果
問題 | No.70 睡眠の重要性! |
ユーザー |
![]() |
提出日時 | 2016-02-18 22:24:38 |
言語 | D (dmd 2.109.1) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 579 bytes |
コンパイル時間 | 754 ms |
コンパイル使用メモリ | 105,896 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-12 02:54:54 |
合計ジャッジ時間 | 1,236 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 |
ソースコード
import std.stdio,std.conv,std.string,std.range,std.math,std.algorithm;void main(){auto N = readln.strip.to!int;int[] H, M, h, m;foreach (_; 0 .. N){auto input = readln.strip.replace(":", " ").split.to!(int[]);H ~= input[0];M ~= input[1];h ~= input[2];m ~= input[3];}int ans;foreach (i; 0 .. N){auto sleepin = H[i] * 60 + M[i];auto wakeup = h[i] * 60 + m[i];ans += (1440 + wakeup - sleepin) % 1440;}ans.writeln;}