結果

問題 No.537 ユーザーID
ユーザー Leonardone
提出日時 2017-07-07 04:04:28
言語 Haskell
(9.10.1)
結果
WA  
実行時間 -
コード長 279 bytes
コンパイル時間 7,600 ms
コンパイル使用メモリ 175,456 KB
実行使用メモリ 8,192 KB
最終ジャッジ日時 2024-10-06 04:42:22
合計ジャッジ時間 5,371 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 19 WA * 13
権限があれば一括ダウンロードができます
コンパイルメッセージ
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

ソースコード

diff #

-- yukicoder My Practice
-- author: Leonardone @ NEETSDKASU

main = print . solve =<< readLn

solve n = ans where
    t = filter f $ takeWhile g [1..]
    f x = mod n x == 0
    g x = x * x <= n
    d = if last t ^ 2 == n  then 1 else 0
    p = length t
    ans = d + (p - d) * 2
0