結果

問題 No.313 π
ユーザー kuwakuwa
提出日時 2015-12-06 01:15:46
言語 Haskell
(9.8.2)
結果
AC  
実行時間 43 ms / 5,000 ms
コード長 444 bytes
コンパイル時間 875 ms
コンパイル使用メモリ 165,280 KB
実行使用メモリ 20,672 KB
最終ジャッジ日時 2023-10-12 16:22:02
合計ジャッジ時間 3,754 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
20,476 KB
testcase_01 AC 43 ms
20,600 KB
testcase_02 AC 42 ms
20,592 KB
testcase_03 AC 42 ms
20,580 KB
testcase_04 AC 42 ms
20,572 KB
testcase_05 AC 42 ms
20,544 KB
testcase_06 AC 42 ms
20,604 KB
testcase_07 AC 42 ms
20,464 KB
testcase_08 AC 42 ms
20,528 KB
testcase_09 AC 43 ms
20,496 KB
testcase_10 AC 42 ms
20,548 KB
testcase_11 AC 42 ms
20,572 KB
testcase_12 AC 42 ms
20,544 KB
testcase_13 AC 43 ms
20,524 KB
testcase_14 AC 42 ms
20,588 KB
testcase_15 AC 42 ms
20,476 KB
testcase_16 AC 42 ms
20,572 KB
testcase_17 AC 43 ms
20,540 KB
testcase_18 AC 42 ms
20,596 KB
testcase_19 AC 42 ms
20,608 KB
testcase_20 AC 42 ms
20,568 KB
testcase_21 AC 42 ms
20,548 KB
testcase_22 AC 42 ms
20,648 KB
testcase_23 AC 43 ms
20,480 KB
testcase_24 AC 42 ms
20,552 KB
testcase_25 AC 42 ms
20,500 KB
testcase_26 AC 42 ms
20,588 KB
testcase_27 AC 42 ms
20,556 KB
testcase_28 AC 42 ms
20,672 KB
testcase_29 AC 42 ms
20,576 KB
testcase_30 AC 43 ms
20,604 KB
testcase_31 AC 42 ms
20,604 KB
testcase_32 AC 42 ms
20,468 KB
testcase_33 AC 43 ms
20,544 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 #

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

main = do
  (x:_:xs) <- getLine
  let muwi = flip map ['0'..'9'] $ \z -> length $ filter (== z) (x:xs)
      diff = zip [0..] $ zipWith (-) muwi answer
      (o1, o2) = foldr f (-1,-1) diff
        where f (ind,v) (p1,p2)
                | v > 0 = (ind, p2)
                | v < 0 = (p1, ind)
                | otherwise = (p1, p2)
  putStrLn $ show o1 ++ " " ++ show o2
0