結果
問題 | No.501 穴と文字列 |
ユーザー |
|
提出日時 | 2019-06-23 18:09:36 |
言語 | Haskell (9.10.1) |
結果 |
AC
|
実行時間 | 5 ms / 2,000 ms |
コード長 | 289 bytes |
コンパイル時間 | 10,560 ms |
コンパイル使用メモリ | 172,160 KB |
実行使用メモリ | 6,144 KB |
最終ジャッジ日時 | 2024-12-26 14:04:05 |
合計ジャッジ時間 | 11,529 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
コンパイルメッセージ
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
ソースコード
main::IO()main = do[n,d] <- map read . words <$> getLine :: IO [Int]let ans = if d <= n thentake d (repeat 'A') ++ take (n-d) (repeat 'C')elsetake (2*n-d) (repeat 'A') ++ take (d-n) (repeat 'B')putStrLn $ ans