結果

問題 No.207 世界のなんとか
ユーザー momen999momen999
提出日時 2017-04-12 12:30:04
言語 Haskell
(9.8.2)
結果
WA  
実行時間 -
コード長 672 bytes
コンパイル時間 842 ms
コンパイル使用メモリ 164,108 KB
実行使用メモリ 12,836 KB
最終ジャッジ日時 2023-09-25 13:00:49
合計ジャッジ時間 7,453 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 TLE -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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 #

choice3 :: [Int] -> [Int]
choice3 [] = []
choice3 (x:xs)
    | x `mod` 3 == 0        = x : choice3 xs
    | choice3' x == True    = x : choice3 xs
    | otherwise             = choice3 xs
    where
        choice3' :: Int -> Bool
        choice3' i =
            let 
                i_10 = floor $ (fromIntegral (i)) / 10
                i_01 = i - i_10 * 10
            in
                i_01 == 3 || choice3' i_10

intListShowRow [] = putStrLn ""
intListShowRow (x:xs) =
    do
        print x
        intListShowRow xs

main = do
    str <- getLine
    let
        w = words str
        a = read (w !! 0)
        b = read (w !! 1)
    intListShowRow $ choice3 [a..b]
0