結果
| 問題 |
No.639 An Ordinary Sequence
|
| コンテスト | |
| ユーザー |
poapoa
|
| 提出日時 | 2020-08-18 08:26:40 |
| 言語 | Haskell (9.10.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 243 bytes |
| コンパイル時間 | 4,019 ms |
| コンパイル使用メモリ | 174,336 KB |
| 実行使用メモリ | 56,448 KB |
| 最終ジャッジ日時 | 2024-10-11 21:59:44 |
| 合計ジャッジ時間 | 5,813 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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
ソースコード
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)
poapoa