結果

問題 No.2110 012 Matching
コンテスト
ユーザー natoriusan
提出日時 2023-07-30 16:20:23
言語 F#
(F# 10.0)
コンパイル:
fsharp_c _filename_
実行:
/usr/bin/dotnet_wrap
結果
WA  
実行時間 -
コード長 291 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 13,280 ms
コンパイル使用メモリ 220,836 KB
実行使用メモリ 64,744 KB
最終ジャッジ日時 2026-04-25 14:48:57
合計ジャッジ時間 14,424 ms
ジャッジサーバーID
(参考情報)
judge3_1 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 1 WA * 10
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (226 ミリ秒)。
/home/judge/data/code/Main.fs(4,17): warning FS0025: この式のパターン マッチが不完全です たとえば、値 '[|_; _; _; _|]' はパターンに含まれないケースを示す可能性があります。 [/home/judge/data/code/main.fsproj]
  main -> /home/judge/data/code/bin/Release/net10.0/main.dll
  main -> /home/judge/data/code/bin/Release/net10.0/publish/

ソースコード

diff #
raw source code

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