結果

問題 No.894 二種類のバス
ユーザー kuuso1kuuso1
提出日時 2019-09-27 23:16:47
言語 F#
(F# 4.0)
結果
WA  
実行時間 -
コード長 395 bytes
コンパイル時間 9,180 ms
コンパイル使用メモリ 195,796 KB
実行使用メモリ 36,264 KB
最終ジャッジ日時 2023-10-25 06:22:41
合計ジャッジ時間 17,773 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 345 ms
36,196 KB
testcase_09 WA -
testcase_10 AC 345 ms
36,196 KB
testcase_11 AC 346 ms
36,208 KB
testcase_12 AC 347 ms
36,208 KB
testcase_13 AC 345 ms
36,208 KB
testcase_14 WA -
testcase_15 AC 347 ms
36,208 KB
testcase_16 WA -
testcase_17 AC 345 ms
36,196 KB
testcase_18 WA -
testcase_19 AC 343 ms
36,192 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (938 ms)。
MSBuild のバージョン 17.7.3+8ec440e68 (.NET)
/home/judge/data/code/Main.fs(8,13): warning FS0025: この式のパターン マッチが不完全です たとえば、値 '[|_; _; _; _|]' はパターンに含まれないケースを示す可能性があります。 [/home/judge/data/code/main.fsproj]
  main -> /home/judge/data/code/bin/Release/net7.0/main.dll
  main -> /home/judge/data/code/bin/Release/net7.0/publish/

ソースコード

diff #

open System

let ri () = stdin.ReadLine() |> int
let rla () = stdin.ReadLine().Split() |> Array.map int64

type Sol() =
    member this.Solve() = 
        let [|T; A; B|] = rla()
        
        let rec gcd a b = if a = 0L then b else gcd (b % a) a
        
        T / A + T / B - T / (A /(gcd A B) * B)
        |> printfn "%d"
        
        
        ()
let mySol = new Sol()
mySol.Solve()
0