結果
| 問題 |
No.415 ぴょん
|
| ユーザー |
kuuso1
|
| 提出日時 | 2016-08-27 17:33:37 |
| 言語 | F# (F# 4.0) |
| 結果 |
AC
|
| 実行時間 | 320 ms / 1,000 ms |
| コード長 | 465 bytes |
| コンパイル時間 | 7,355 ms |
| コンパイル使用メモリ | 189,224 KB |
| 実行使用メモリ | 34,736 KB |
| 最終ジャッジ日時 | 2024-11-18 14:44:26 |
| 合計ジャッジ時間 | 15,447 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 27 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (275 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/
ソースコード
open System
let ri () = stdin.ReadLine() |> int
let ria () = stdin.ReadLine().Split() |> Array.map int
let rec gcd s t =
match s with
| 0 -> t
| _ -> gcd (t%s) s
type Sol() =
member this.Solve() =
let (N,D) = stdin.ReadLine().Split([|' '|],StringSplitOptions.RemoveEmptyEntries) |> Array.map int |> (fun a -> (a.[0],a.[1]))
N / (gcd N D) - 1 |> printfn "%d"
let mySol = new Sol()
mySol.Solve()
kuuso1