結果
問題 | No.312 置換処理 |
ユーザー |
|
提出日時 | 2016-03-11 17:59:19 |
言語 | Haskell (9.10.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 263 bytes |
コンパイル時間 | 1,932 ms |
コンパイル使用メモリ | 175,872 KB |
実行使用メモリ | 8,192 KB |
最終ジャッジ日時 | 2024-09-25 00:51:33 |
合計ジャッジ時間 | 3,511 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 40 WA * 5 |
コンパイルメッセージ
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(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