結果

問題 No.716 距離
ユーザー horiesinitihoriesiniti
提出日時 2018-12-08 17:20:29
言語 Haskell
(9.8.2)
結果
AC  
実行時間 13 ms / 2,000 ms
コード長 272 bytes
コンパイル時間 773 ms
コンパイル使用メモリ 158,696 KB
実行使用メモリ 11,532 KB
最終ジャッジ日時 2023-10-12 05:01:42
合計ジャッジ時間 2,759 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
11,532 KB
testcase_01 AC 12 ms
11,336 KB
testcase_02 AC 12 ms
11,384 KB
testcase_03 AC 12 ms
11,424 KB
testcase_04 AC 13 ms
11,492 KB
testcase_05 AC 12 ms
11,436 KB
testcase_06 AC 12 ms
11,372 KB
testcase_07 AC 3 ms
7,116 KB
testcase_08 AC 3 ms
7,136 KB
testcase_09 AC 3 ms
7,212 KB
testcase_10 AC 8 ms
11,308 KB
testcase_11 AC 6 ms
10,216 KB
testcase_12 AC 12 ms
11,352 KB
testcase_13 AC 8 ms
11,348 KB
testcase_14 AC 3 ms
7,256 KB
testcase_15 AC 12 ms
11,408 KB
testcase_16 AC 7 ms
11,180 KB
testcase_17 AC 12 ms
11,336 KB
testcase_18 AC 4 ms
7,984 KB
testcase_19 AC 6 ms
10,440 KB
testcase_20 AC 3 ms
7,340 KB
testcase_21 AC 3 ms
8,084 KB
testcase_22 AC 5 ms
9,304 KB
testcase_23 AC 3 ms
7,968 KB
testcase_24 AC 12 ms
11,388 KB
testcase_25 AC 6 ms
10,248 KB
testcase_26 AC 7 ms
11,476 KB
testcase_27 AC 7 ms
11,344 KB
testcase_28 AC 4 ms
7,916 KB
testcase_29 AC 12 ms
11,328 KB
testcase_30 AC 8 ms
11,368 KB
testcase_31 AC 8 ms
11,312 KB
testcase_32 AC 7 ms
11,316 KB
testcase_33 AC 7 ms
11,392 KB
testcase_34 AC 6 ms
11,076 KB
testcase_35 AC 2 ms
7,388 KB
testcase_36 AC 4 ms
8,944 KB
testcase_37 AC 4 ms
7,456 KB
testcase_38 AC 6 ms
9,824 KB
testcase_39 AC 12 ms
11,296 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 #

import Data.List

f ::[Int]->[Int]
f (x:[])=[]
f (x:y:xs)=(y-x):f (y:xs)

main = do
       e<-getLine
       es<-getLine
       let as=map read (words es)::[Int]
           bs=sort as
       putStrLn $ show $ minimum (f bs)
       putStrLn $ show $ maximum(bs)-minimum(bs)
0