結果
問題 | No.9002 FizzBuzz(テスト用) |
ユーザー | kuuso1 |
提出日時 | 2015-04-02 22:16:50 |
言語 | Haskell (9.8.2) |
結果 |
AC
|
実行時間 | 3 ms / 5,000 ms |
コード長 | 283 bytes |
コンパイル時間 | 2,664 ms |
コンパイル使用メモリ | 157,228 KB |
実行使用メモリ | 7,132 KB |
最終ジャッジ日時 | 2023-09-17 01:24:38 |
合計ジャッジ時間 | 1,150 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 3 ms
6,960 KB |
testcase_01 | AC | 2 ms
6,972 KB |
testcase_02 | AC | 2 ms
7,020 KB |
testcase_03 | AC | 3 ms
7,132 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 ) Main.hs:3:1: warning: [GHC-94817] [-Wtabs] Tab character found here, and in 7 further locations. Suggested fix: Please use spaces instead. | 3 | ns<-getLine | ^^^^^^^^ [2 of 2] Linking a.out
ソースコード
main :: IO () main=do ns<-getLine let nn=rI ns let na=[1..nn] mapM_ (putStrLn.fizzBuzz) na fizzBuzz ::Int->String fizzBuzz x | x `mod` 15 == 0 = "FizzBuzz" | x `mod` 3 == 0 = "Fizz" | x `mod` 5 == 0 = "Buzz" | otherwise = show x rI :: String->Int rI s=read s ::Int