結果
| 問題 |
No.415 ぴょん
|
| ユーザー |
kuuso1
|
| 提出日時 | 2016-08-26 22:51:30 |
| 言語 | F# (F# 4.0) |
| 結果 |
AC
|
| 実行時間 | 333 ms / 1,000 ms |
| コード長 | 445 bytes |
| コンパイル時間 | 7,006 ms |
| コンパイル使用メモリ | 189,324 KB |
| 実行使用メモリ | 34,868 KB |
| 最終ジャッジ日時 | 2024-11-18 14:37:42 |
| 合計ジャッジ時間 | 16,097 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 27 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (241 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([|' '|],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