結果
| 問題 |
No.415 ぴょん
|
| ユーザー |
kuuso1
|
| 提出日時 | 2016-08-26 22:45:47 |
| 言語 | F# (F# 4.0) |
| 結果 |
AC
|
| 実行時間 | 325 ms / 1,000 ms |
| コード長 | 423 bytes |
| コンパイル時間 | 13,134 ms |
| コンパイル使用メモリ | 191,728 KB |
| 実行使用メモリ | 34,860 KB |
| 最終ジャッジ日時 | 2024-11-18 14:35:43 |
| 合計ジャッジ時間 | 15,789 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 27 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (416 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 a b = if a = 0 then b else gcd (b%a) a
type Sol() =
member this.Solve() =
let (N,D) = stdin.ReadLine().Split(' ') |> Array.map int |> (fun a -> (a.[0],a.[1]))
N / (gcd N D) - 1 |> printfn "%d"
()
let mySol = new Sol()
mySol.Solve()
kuuso1