結果
問題 |
No.693 square1001 and Permutation 2
|
ユーザー |
![]() |
提出日時 | 2018-06-09 04:51:08 |
言語 | Haskell (9.10.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 217 bytes |
コンパイル時間 | 10,331 ms |
コンパイル使用メモリ | 174,848 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-30 12:23:05 |
合計ジャッジ時間 | 6,200 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 5 WA * 4 |
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.8.2/environments/default [1 of 2] Compiling Main ( Main.hs, Main.o ) [2 of 2] Linking a.out
ソースコード
import Data.List main = do e<-getLine e2<-getLine let xs=sort $ map read (words e2)::[Integer] ys=zip [1..] xs ans=foldl (\ acc (a,b) -> acc+a-b) 0 ys putStrLn $ show $ ans