結果

問題 No.207 世界のなんとか
ユーザー lvs7k
提出日時 2018-09-10 22:25:17
言語 Haskell
(9.10.1)
結果
AC  
実行時間 4 ms / 5,000 ms
コード長 324 bytes
コンパイル時間 5,713 ms
コンパイル使用メモリ 177,152 KB
実行使用メモリ 6,016 KB
最終ジャッジ日時 2025-01-02 19:58:20
合計ジャッジ時間 6,580 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 19
権限があれば一括ダウンロードができます
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.10.1/environments/default
[1 of 2] Compiling Main             ( Main.hs, Main.o )
[2 of 2] Linking a.out

ソースコード

diff #

module Main where

import Control.Applicative
import Control.Monad

nabeatsu :: Integer -> Bool
nabeatsu n
    | n `mod` 3 == 0        = True
    | any (== '3') (show n) = True
    | otherwise             = False

main :: IO ()
main = do
    [a, b] <- fmap read . words <$> getLine
    mapM_ print (filter nabeatsu [a .. b])
0