結果

問題 No.207 世界のなんとか
ユーザー momen999momen999
提出日時 2017-04-12 12:40:36
言語 Haskell
(9.8.2)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 708 bytes
コンパイル時間 1,635 ms
コンパイル使用メモリ 160,352 KB
実行使用メモリ 7,448 KB
最終ジャッジ日時 2023-09-12 12:42:45
合計ジャッジ時間 2,909 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 3 ms
7,040 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 #

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' 0 = False
        choice3' i =
            let 
                i_10 = floor $ (fromIntegral (i :: Int)) / 10.0
                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