結果
| 問題 | No.171 スワップ文字列(Med) | 
| コンテスト | |
| ユーザー |  aimy | 
| 提出日時 | 2017-05-12 12:56:53 | 
| 言語 | Haskell (9.10.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 3 ms / 1,000 ms | 
| コード長 | 252 bytes | 
| コンパイル時間 | 8,839 ms | 
| コンパイル使用メモリ | 172,928 KB | 
| 実行使用メモリ | 5,632 KB | 
| 最終ジャッジ日時 | 2024-09-15 10:42:04 | 
| 合計ジャッジ時間 | 9,513 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 10 | 
コンパイルメッセージ
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
ソースコード
import Data.List fact n = product [1..n] main = getLine >>= print . nswap nswap :: String -> Integer nswap s = (div (fact (fromIntegral (length s))) (product (map fact ldup)) - 1) `mod` 573 where ldup = map (fromIntegral . length) (group (sort s))
