結果
| 問題 | No.2110 012 Matching | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2023-07-30 16:20:23 | 
| 言語 | F# (F# 4.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 291 bytes | 
| コンパイル時間 | 8,116 ms | 
| コンパイル使用メモリ | 197,324 KB | 
| 実行使用メモリ | 58,240 KB | 
| 最終ジャッジ日時 | 2024-10-09 11:33:24 | 
| 合計ジャッジ時間 | 17,840 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 | 
| other | AC * 1 WA * 10 | 
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (304 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/
ソースコード
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
            
            
            
        