結果
問題 |
No.680 作れる数
|
ユーザー |
![]() |
提出日時 | 2018-05-02 23:00:26 |
言語 | Haskell (9.10.1) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 174 bytes |
コンパイル時間 | 1,858 ms |
コンパイル使用メモリ | 176,640 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-28 00:24:32 |
合計ジャッジ時間 | 2,596 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
コンパイルメッセージ
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 = do n <- readLn putStrLn $ if elem 0 $ scanl (\x y -> if x>=y then x-y else x)n $ reverse $ takeWhile (<= n) $ scanl1 (+) $ map (2^) [0..] then "YES" else "NO"