結果

問題 No.70 睡眠の重要性!
ユーザー むらためむらため
提出日時 2017-08-15 00:27:56
言語 Nim
(2.0.2)
結果
WA  
実行時間 -
コード長 395 bytes
コンパイル時間 3,470 ms
コンパイル使用メモリ 71,828 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-12 14:29:40
合計ジャッジ時間 3,814 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 2 ms
4,384 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
/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]

ソースコード

diff #

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()
0