結果

問題 No.1131 Deviation Score
ユーザー nnsnico
提出日時 2020-08-02 18:39:01
言語 Haskell
(9.10.1)
結果
WA  
実行時間 -
コード長 395 bytes
コンパイル時間 7,976 ms
コンパイル使用メモリ 180,048 KB
実行使用メモリ 18,688 KB
最終ジャッジ日時 2024-07-19 04:42:16
合計ジャッジ時間 9,444 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 1 WA * 20
権限があれば一括ダウンロードができます
コンパイルメッセージ
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

ソースコード

diff #

module Main where

import qualified Data.ByteString.Char8 as BS
import Data.Char
import Data.List
import Data.Maybe
import Control.Monad

main :: IO ()
main = do
  BS.getLine
  xn <- map (fst . fromJust . BS.readInt) . BS.words <$> BS.getLine
  let r = solve xn
  mapM_ print r

solve :: [Int] -> [Int]
solve xn = map (\x -> 50 - ((avr - x) `div` 2)) xn
  where
    avr = sum xn `div` length xn
0