結果

問題 No.2110 012 Matching
ユーザー natoriusannatoriusan
提出日時 2023-07-30 16:20:23
言語 F#
(F# 4.0)
結果
WA  
実行時間 -
コード長 291 bytes
コンパイル時間 6,328 ms
コンパイル使用メモリ 198,164 KB
実行使用メモリ 58,368 KB
最終ジャッジ日時 2024-04-17 17:25:54
合計ジャッジ時間 15,231 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 322 ms
34,496 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 334 ms
34,496 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (212 ms)。
MSBuild のバージョン 17.9.6+a4ecab324 (.NET)
/home/judge/data/code/Main.fs(4,17): 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 #

let t = stdin.ReadLine () |> int

for _ in 0..t-1 do
    let mutable [|a; b; c|] = stdin.ReadLine().Split " " |> Array.map int64
    let mutable ans = min a c * 2L + b / 2L * 2L
    if a < c then
        ans <- ans + (c-a) / 2L
    else
        ans <- ans + (c-a)*(b%2L)
    printfn "%d" ans
0