結果

問題 No.171 スワップ文字列(Med)
ユーザー gigurururugigurururu
提出日時 2015-03-22 23:35:12
言語 Haskell
(9.6.2)
結果
AC  
実行時間 4 ms / 1,000 ms
コード長 232 bytes
コンパイル時間 11,873 ms
コンパイル使用メモリ 158,772 KB
実行使用メモリ 8,924 KB
最終ジャッジ日時 2023-09-11 09:34:20
合計ジャッジ時間 2,088 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,704 KB
testcase_01 AC 2 ms
6,800 KB
testcase_02 AC 3 ms
7,596 KB
testcase_03 AC 2 ms
7,124 KB
testcase_04 AC 3 ms
7,100 KB
testcase_05 AC 3 ms
7,564 KB
testcase_06 AC 4 ms
8,224 KB
testcase_07 AC 4 ms
8,336 KB
testcase_08 AC 4 ms
8,924 KB
testcase_09 AC 4 ms
8,532 KB
testcase_10 AC 2 ms
6,748 KB
testcase_11 AC 2 ms
6,836 KB
testcase_12 AC 3 ms
7,088 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.Applicative
import Data.List

fact 1 = 1
fact n = n * fact (n-1)

main = do
  s <- getLine
  print $ (`mod`573) $ (fact.fromIntegral.length $ s) `div` (product . map (fact.fromIntegral.length) . group . sort $ s) - 1
0