結果
問題 |
No.639 An Ordinary Sequence
|
ユーザー |
![]() |
提出日時 | 2020-08-18 08:26:03 |
言語 | Haskell (9.10.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 276 bytes |
コンパイル時間 | 1,885 ms |
コンパイル使用メモリ | 170,752 KB |
実行使用メモリ | 56,320 KB |
最終ジャッジ日時 | 2024-10-11 21:58:24 |
合計ジャッジ時間 | 3,509 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 RE * 1 |
other | AC * 10 RE * 7 |
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.8.2/environments/default [1 of 2] Compiling Main ( Main.hs, Main.o ) [2 of 2] Linking a.out
ソースコード
{-# LANGUAGE BangPatterns #-} main :: IO () main = do n <- readLn :: IO Int print $ solver n solver :: Int -> Int solver = iter where iter :: Int -> Int iter = (map f [0..10^6] !!) where f 0 = 1 f !i = iter (i `div` 3) + iter (i `div` 5)