結果
| 問題 | No.312 置換処理 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-03-11 17:56:13 |
| 言語 | Haskell (9.10.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 271 bytes |
| 記録 | |
| コンパイル時間 | 5,878 ms |
| コンパイル使用メモリ | 176,256 KB |
| 実行使用メモリ | 8,192 KB |
| 最終ジャッジ日時 | 2024-09-25 00:51:05 |
| 合計ジャッジ時間 | 3,022 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 37 WA * 8 |
コンパイルメッセージ
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
ソースコード
divisor n p | p>ceiling(sqrt (fromIntegral n)) = [n]
| True = if n`mod`p==0 then p:(divisor (n`div`p)(p+1)) else divisor n (p+1)
main=do
n<-getLine>>=return.(read::String->Integer)
let a = take 2 $ divisor n 2
print$if a!!0==2 then a!!1 else a!!0