結果

問題 No.415 ぴょん
ユーザー kuuso1
提出日時 2016-08-26 22:50:56
言語 F#
(F# 4.0)
結果
AC  
実行時間 330 ms / 1,000 ms
コード長 447 bytes
コンパイル時間 6,600 ms
コンパイル使用メモリ 188,740 KB
実行使用メモリ 34,740 KB
最終ジャッジ日時 2024-11-18 14:37:17
合計ジャッジ時間 16,411 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 27
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (239 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/

ソースコード

diff #

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()
0