結果

問題 No.415 ぴょん
ユーザー kuuso1kuuso1
提出日時 2016-08-26 22:43:25
言語 F#
(F# 4.0)
結果
AC  
実行時間 83 ms / 1,000 ms
コード長 379 bytes
コンパイル時間 5,344 ms
コンパイル使用メモリ 170,064 KB
実行使用メモリ 24,920 KB
最終ジャッジ日時 2023-08-11 20:17:59
合計ジャッジ時間 8,684 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
22,880 KB
testcase_01 AC 80 ms
24,904 KB
testcase_02 AC 81 ms
24,764 KB
testcase_03 AC 81 ms
22,884 KB
testcase_04 AC 80 ms
22,812 KB
testcase_05 AC 80 ms
20,780 KB
testcase_06 AC 81 ms
22,932 KB
testcase_07 AC 82 ms
22,708 KB
testcase_08 AC 80 ms
22,832 KB
testcase_09 AC 80 ms
24,876 KB
testcase_10 AC 80 ms
22,752 KB
testcase_11 AC 81 ms
22,796 KB
testcase_12 AC 81 ms
22,824 KB
testcase_13 AC 82 ms
22,936 KB
testcase_14 AC 82 ms
22,848 KB
testcase_15 AC 81 ms
22,780 KB
testcase_16 AC 82 ms
22,848 KB
testcase_17 AC 81 ms
22,904 KB
testcase_18 AC 81 ms
24,920 KB
testcase_19 AC 79 ms
22,832 KB
testcase_20 AC 80 ms
24,892 KB
testcase_21 AC 81 ms
22,808 KB
testcase_22 AC 77 ms
20,688 KB
testcase_23 AC 80 ms
24,892 KB
testcase_24 AC 82 ms
24,844 KB
testcase_25 AC 83 ms
22,712 KB
testcase_26 AC 82 ms
22,856 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

/home/judge/data/code/Main.fs(10,13): warning FS0025: Incomplete pattern matches on this expression. For example, the value '[|_; _; _|]' may indicate a case not covered by the pattern(s).

ソースコード

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