結果
問題 |
No.415 ぴょん
|
ユーザー |
![]() |
提出日時 | 2016-08-27 17:48:47 |
言語 | F# (F# 4.0) |
結果 |
AC
|
実行時間 | 337 ms / 1,000 ms |
コード長 | 469 bytes |
コンパイル時間 | 8,874 ms |
コンパイル使用メモリ | 187,776 KB |
実行使用メモリ | 34,712 KB |
最終ジャッジ日時 | 2024-11-18 14:44:52 |
合計ジャッジ時間 | 17,103 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 27 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (254 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 | 0L -> t | _ -> gcd (t%s) s type Sol() = member this.Solve() = let (N,D) = stdin.ReadLine().Split([|' '|],StringSplitOptions.RemoveEmptyEntries) |> Array.map int64 |> (fun a -> (a.[0],a.[1])) N / (gcd N D) - 1L |> printfn "%d" let mySol = new Sol() mySol.Solve()