結果

問題 No.185 和風
ユーザー aimyaimy
提出日時 2017-04-17 16:15:54
言語 Haskell
(9.8.2)
結果
AC  
実行時間 12 ms / 1,000 ms
コード長 165 bytes
コンパイル時間 955 ms
コンパイル使用メモリ 157,884 KB
実行使用メモリ 11,328 KB
最終ジャッジ日時 2023-09-26 10:41:20
合計ジャッジ時間 1,781 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 6 ms
11,296 KB
testcase_01 AC 12 ms
11,328 KB
testcase_02 AC 2 ms
7,248 KB
testcase_03 AC 2 ms
7,380 KB
testcase_04 AC 2 ms
7,212 KB
testcase_05 AC 2 ms
7,196 KB
testcase_06 AC 12 ms
11,292 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.6.1/environments/default
[1 of 2] Compiling Main             ( Main.hs, Main.o )
[2 of 2] Linking a.out

ソースコード

diff #

main = getContents >>= print . wafu . map (map read . words) . tail . lines

wafu nss = if n>0 && all (==n) ns then n else -1
 where (n:ns) = map (\[x,y] -> y-x) nss
0