結果

問題 No.313 π
ユーザー aimy
提出日時 2017-05-05 16:12:47
言語 Haskell
(9.10.1)
結果
AC  
実行時間 45 ms / 5,000 ms
コード長 329 bytes
コンパイル時間 4,956 ms
コンパイル使用メモリ 167,424 KB
実行使用メモリ 17,920 KB
最終ジャッジ日時 2024-09-14 08:42:45
合計ジャッジ時間 7,453 ms
ジャッジサーバーID
(参考情報)
judge6 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 32
権限があれば一括ダウンロードができます
コンパイルメッセージ
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 #

import Data.List
import Data.Maybe

appearance = [20104,20063,19892,20011,19874,20199,19898,20163,19956,19841]

main = getLine >>= putStrLn . unwords . map show . count

count ds = map fromJust $ sequence [findIndex (<0), findIndex (>0)] diff
 where diff = zipWith (-) appearance $ map (length . flip filter ds . (==)) ['0'..'9']
0