結果
| 問題 | No.537 ユーザーID | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2020-05-24 11:07:52 | 
| 言語 | Haskell (9.10.1) | 
| 結果 | 
                                CE
                                 
                            (最新) 
                                AC
                                 
                            (最初) | 
| 実行時間 | - | 
| コード長 | 502 bytes | 
| コンパイル時間 | 2,478 ms | 
| コンパイル使用メモリ | 149,504 KB | 
| 最終ジャッジ日時 | 2024-11-14 22:30:16 | 
| 合計ジャッジ時間 | 3,062 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge5 | 
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
            
            
            
            
            ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.8.2/environments/default
[1 of 2] Compiling Main             ( Main.hs, Main.o )
Main.hs:1:1: error: [GHC-87110]
    Could not load module ‘Data.Set’.
    It is a member of the hidden package ‘containers-0.6.8’.
    Use -v to see a list of the files searched for.
  |
1 | import qualified Data.Set as Set
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            
            ソースコード
import qualified Data.Set as Set
main :: IO ()
main = do
    n <- read <$> getLine
    print $ solve n
solve :: Int -> Int
solve n = length $ Set.fromList $ divisor n (floor $ sqrt $ fromIntegral n)
divisor :: Int -> Int -> [String]
divisor n 0 = []
divisor n i = if n `mod` i == 0
    then if i ^ 2 /= n
        then ((show (n `div` i)) ++ (show i)) : ((show i) ++ (show $ n `div` i)) : divisor n (i - 1)
        else ((show i) ++ (show $ n `div` i)) : divisor n (i - 1)
    else divisor n (i - 1)
            
            
            
        