結果
問題 | No.687 E869120 and Constructing Array 1 |
ユーザー | 情報学生 |
提出日時 | 2019-08-24 16:57:48 |
言語 | Haskell (9.8.2) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 672 bytes |
コンパイル時間 | 4,655 ms |
コンパイル使用メモリ | 176,000 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-14 12:53:25 |
合計ジャッジ時間 | 5,334 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
6,816 KB |
testcase_01 | AC | 1 ms
6,816 KB |
testcase_02 | AC | 1 ms
6,824 KB |
testcase_03 | AC | 2 ms
6,816 KB |
testcase_04 | AC | 1 ms
6,816 KB |
testcase_05 | AC | 2 ms
6,820 KB |
testcase_06 | AC | 1 ms
6,816 KB |
testcase_07 | AC | 1 ms
6,816 KB |
testcase_08 | AC | 2 ms
6,820 KB |
コンパイルメッセージ
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 = unwords . solve <$> readLn >>= putStrLn solve :: Int -> [String] solve n | n == 2 = ["1", "1"] | n == 3 = ["2", "1"] | n == 4 = ["2", "2"] | n == 5 = ["3", "2"] | n == 6 = ["3", "3"] | n == 7 = ["2", "5"] | n == 8 = ["3", "5"] | n == 9 = ["5", "4"] | n == 10 = ["7", "3"] | n == 11 = ["9", "2"] | n == 12 = ["7", "5"] | n == 13 = ["6", "7"] | n == 14 = ["6", "8"] | n == 15 = ["9", "6"] | n == 16 = ["8", "8"] | n == 17 = ["8", "9"] | n == 18 = ["9", "9"] | n == 19 = ["10", "9"] | n == 20 = ["10", "10"] | otherwise = [""]