結果
| 問題 |
No.70 睡眠の重要性!
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-08-15 00:27:56 |
| 言語 | Nim (2.2.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 395 bytes |
| コンパイル時間 | 3,494 ms |
| コンパイル使用メモリ | 71,704 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-30 02:33:55 |
| 合計ジャッジ時間 | 3,562 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 5 WA * 1 |
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 50) Warning: Use the new 'sugar' module instead; future is deprecated [Deprecated] /home/judge/data/code/Main.nim(1, 50) Warning: imported and not used: 'future' [UnusedImport] /home/judge/data/code/Main.nim(1, 57) Warning: imported and not used: 'macros' [UnusedImport] /home/judge/data/code/Main.nim(1, 26) Warning: imported and not used: 'strscans' [UnusedImport] /home/judge/data/code/Main.nim(1, 35) Warning: imported and not used: 'algorithm' [UnusedImport]
ソースコード
import sequtils,strutils,strscans,algorithm,math,future,macros
template get*():string = stdin.readLine() #.strip()
proc to24(h:int): int = (if h < 12: 24 + h else: h)
let N = get().parseInt()
echo newSeqWith(N,get().split().mapIt(it.split(":").map(parseInt)))
.mapIt((gh:it[0][0],gm:it[0][1],wh:it[1][0],wm:it[1][1]))
.mapIt(60*(it.wh.to24 - it.gh.to24) + (it.wm - it.gm))
.sum()