結果
問題 |
No.312 置換処理
|
ユーザー |
![]() |
提出日時 | 2018-04-21 18:42:46 |
言語 | F# (F# 4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 284 bytes |
コンパイル時間 | 7,225 ms |
コンパイル使用メモリ | 189,380 KB |
実行使用メモリ | 35,212 KB |
最終ジャッジ日時 | 2024-06-27 05:26:58 |
合計ジャッジ時間 | 24,554 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 44 WA * 1 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (240 ms)。 MSBuild のバージョン 17.9.6+a4ecab324 (.NET) main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
let minDivsor n = seq{3L..n|>float|>sqrt|>int64} |> Seq.where(fun x -> n%x=0L) |> Seq.tryHead let n = stdin.ReadLine() |> int64 n |> minDivsor |> function | Some(x) -> x | None -> match n%2L with | 0L -> n/2L | _ -> n |> printfn "%i"