結果
| 問題 |
No.36 素数が嫌い!
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-04-05 08:24:02 |
| 言語 | Haskell (9.10.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 246 bytes |
| コンパイル時間 | 1,825 ms |
| コンパイル使用メモリ | 172,928 KB |
| 実行使用メモリ | 14,504 KB |
| 最終ジャッジ日時 | 2024-10-04 01:17:30 |
| 合計ジャッジ時間 | 14,439 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 4 |
| other | TLE * 1 -- * 25 |
コンパイルメッセージ
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:4:1: warning: [GHC-94817] [-Wtabs]
Tab character found here, and in six further locations.
Suggested fix: Please use spaces instead.
|
4 | if n `mod` f == 0
| ^^^^^^^^
[2 of 2] Linking a.out
ソースコード
factorize :: Integer -> Integer -> [Integer] factorize 1 _ = [] factorize n f = if n `mod` f == 0 then f : (factorize (n`div`f) f) else factorize n (f+1) main = do n <- readLn putStrLn $ if length (factorize n 2) >= 3 then "YES" else "NO"