結果

問題 No.313 π
ユーザー kuwakuwa
提出日時 2015-12-06 01:08:15
言語 Haskell
(9.8.2)
結果
AC  
実行時間 53 ms / 5,000 ms
コード長 375 bytes
コンパイル時間 3,896 ms
コンパイル使用メモリ 164,364 KB
実行使用メモリ 20,572 KB
最終ジャッジ日時 2023-10-12 16:21:57
合計ジャッジ時間 5,362 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 52 ms
20,376 KB
testcase_01 AC 52 ms
20,520 KB
testcase_02 AC 42 ms
20,508 KB
testcase_03 AC 52 ms
20,376 KB
testcase_04 AC 53 ms
20,512 KB
testcase_05 AC 52 ms
20,448 KB
testcase_06 AC 52 ms
20,532 KB
testcase_07 AC 52 ms
20,408 KB
testcase_08 AC 53 ms
20,472 KB
testcase_09 AC 53 ms
20,408 KB
testcase_10 AC 52 ms
20,412 KB
testcase_11 AC 52 ms
20,552 KB
testcase_12 AC 53 ms
20,472 KB
testcase_13 AC 52 ms
20,488 KB
testcase_14 AC 53 ms
20,380 KB
testcase_15 AC 52 ms
20,504 KB
testcase_16 AC 52 ms
20,528 KB
testcase_17 AC 52 ms
20,520 KB
testcase_18 AC 52 ms
20,468 KB
testcase_19 AC 52 ms
20,412 KB
testcase_20 AC 53 ms
20,468 KB
testcase_21 AC 52 ms
20,508 KB
testcase_22 AC 53 ms
20,572 KB
testcase_23 AC 53 ms
20,504 KB
testcase_24 AC 53 ms
20,460 KB
testcase_25 AC 52 ms
20,476 KB
testcase_26 AC 52 ms
20,412 KB
testcase_27 AC 53 ms
20,408 KB
testcase_28 AC 52 ms
20,480 KB
testcase_29 AC 42 ms
20,460 KB
testcase_30 AC 53 ms
20,492 KB
testcase_31 AC 53 ms
20,488 KB
testcase_32 AC 52 ms
20,528 KB
testcase_33 AC 52 ms
20,412 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 #

import Control.Monad

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 = head $ [a | (a,b) <- diff, b > 0]
      o2 = head $ [a | (a,b) <- diff, b < 0]
  putStrLn $ show o1 ++ " " ++ show o2
0