結果

問題 No.311 z in FizzBuzzString
コンテスト
ユーザー kuwa
提出日時 2015-12-04 00:21:20
言語 Haskell
(9.14.1)
コンパイル:
ghc -rtsopts -with-rtsopts=-K1G -o a.out -O2 _filename_
実行:
./a.out
結果
AC  
実行時間 2 ms / 1,500 ms
コード長 260 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 8,842 ms
コンパイル使用メモリ 207,128 KB
実行使用メモリ 6,400 KB
最終ジャッジ日時 2026-04-12 10:14:03
合計ジャッジ時間 7,619 ms
ジャッジサーバーID
(参考情報)
judge3_1 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 11
権限があれば一括ダウンロードができます
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.14.1/environments/default
[1 of 2] Compiling Main             ( Main.hs, Main.o )
Main.hs:8:48: warning: [GHC-68441] [-Wdeprecations]
    In the use of ‘getLine’ (imported from Data.ByteString):
    Deprecated: "Deprecated since @bytestring-0.12@. Use 'Data.ByteString.Char8.getLine' instead. (Functions that rely on ASCII encodings belong in "Data.ByteString.Char8")"
  |
8 |     n <- (fst . fromJust . BC.readInteger) <$> B.getLine
  |                                                ^^^^^^^^^

[2 of 2] Linking a.out

ソースコード

diff #
raw source code

import Control.Applicative
import Data.Maybe
import qualified Data.ByteString.Char8 as BC
import qualified Data.ByteString as B

main :: IO ()
main = do
    n <- (fst . fromJust . BC.readInteger) <$> B.getLine
    putStrLn $ show $ 2 * (n `div` 3 + n `div` 5)
0