結果
問題 | No.278 連続する整数の和(2) |
ユーザー |
![]() |
提出日時 | 2015-11-17 16:00:29 |
言語 | Haskell (9.10.1) |
結果 |
AC
|
実行時間 | 79 ms / 2,000 ms |
コード長 | 333 bytes |
コンパイル時間 | 5,105 ms |
コンパイル使用メモリ | 171,392 KB |
実行使用メモリ | 8,064 KB |
最終ジャッジ日時 | 2024-12-23 09:10:18 |
合計ジャッジ時間 | 6,693 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 18 |
コンパイルメッセージ
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
ソースコード
importData.Listnubdivisors::Integrala=>a->adivisors 1 = [1]divisors n = (1 :) $ (n :) $ nub $ concat [[x, d] |x <- [2 .. l], let (d, m) = divMod n x, m == 0]where l = floor $ sqrt $ fromIntegral nmain::IO()main = print . sum .divisors . (\n -> if odd n then n else div n 2) =<< readLn