結果

問題 No.415 ぴょん
ユーザー kuuso1kuuso1
提出日時 2016-08-26 22:43:25
言語 F#
(F# 4.0)
結果
AC  
実行時間 335 ms / 1,000 ms
コード長 379 bytes
コンパイル時間 9,723 ms
コンパイル使用メモリ 198,492 KB
実行使用メモリ 34,872 KB
最終ジャッジ日時 2024-04-29 11:32:41
合計ジャッジ時間 19,966 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 323 ms
34,864 KB
testcase_01 AC 327 ms
34,328 KB
testcase_02 AC 323 ms
34,608 KB
testcase_03 AC 332 ms
34,352 KB
testcase_04 AC 326 ms
34,604 KB
testcase_05 AC 321 ms
34,740 KB
testcase_06 AC 320 ms
34,604 KB
testcase_07 AC 321 ms
34,612 KB
testcase_08 AC 326 ms
34,188 KB
testcase_09 AC 327 ms
34,488 KB
testcase_10 AC 335 ms
34,608 KB
testcase_11 AC 327 ms
34,484 KB
testcase_12 AC 332 ms
34,860 KB
testcase_13 AC 333 ms
34,608 KB
testcase_14 AC 325 ms
34,480 KB
testcase_15 AC 329 ms
34,056 KB
testcase_16 AC 324 ms
34,608 KB
testcase_17 AC 321 ms
34,612 KB
testcase_18 AC 331 ms
34,348 KB
testcase_19 AC 329 ms
34,740 KB
testcase_20 AC 324 ms
34,476 KB
testcase_21 AC 327 ms
34,608 KB
testcase_22 AC 326 ms
34,608 KB
testcase_23 AC 329 ms
34,372 KB
testcase_24 AC 332 ms
34,872 KB
testcase_25 AC 325 ms
34,352 KB
testcase_26 AC 325 ms
34,612 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (269 ms)。
MSBuild のバージョン 17.9.6+a4ecab324 (.NET)
/home/judge/data/code/Main.fs(10,13): warning FS0025: この式のパターン マッチが不完全です たとえば、値 '[|_; _; _|]' はパターンに含まれないケースを示す可能性があります。 [/home/judge/data/code/main.fsproj]
  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 = 0L then b else gcd (b%a) a

type Sol() =
    member this.Solve() = 
        
        let [|N;D|] = ria() |> Array.map int64
        
        N / (gcd N D) - 1L |> printfn "%d"
        
        
        
        ()
let mySol = new Sol()
mySol.Solve()
0