結果
問題 | No.1096 Range Sums |
ユーザー |
![]() |
提出日時 | 2020-07-16 15:13:19 |
言語 | Haskell (9.10.1) |
結果 |
AC
|
実行時間 | 11 ms / 2,000 ms |
コード長 | 413 bytes |
コンパイル時間 | 6,184 ms |
コンパイル使用メモリ | 181,012 KB |
実行使用メモリ | 9,472 KB |
最終ジャッジ日時 | 2024-11-15 04:54:17 |
合計ジャッジ時間 | 6,616 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 12 |
コンパイルメッセージ
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
ソースコード
importData.CharisSpaceimportqualifiedData.ByteString.CharasBimportqualifiedData.ListasLgetIL::IOIntgetIL = L.unfoldr f <$> B.getLinewheref s = do(n, s') <- B.readInt sreturn (n, B.dropWhile isSpace s')main::IO()main = don <- readLn :: IO Intxs <- getILprint $ sum $ map (\(x, y) -> y * x * (n - x + 1)) $ zip [1 .. ] xs