結果
問題 |
No.2110 012 Matching
|
ユーザー |
![]() |
提出日時 | 2023-01-19 03:15:23 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 333 ms / 2,000 ms |
コード長 | 318 bytes |
コンパイル時間 | 137 ms |
コンパイル使用メモリ | 7,680 KB |
実行使用メモリ | 13,312 KB |
最終ジャッジ日時 | 2024-06-12 03:00:16 |
合計ジャッジ時間 | 3,890 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 11 |
コンパイルメッセージ
Syntax OK
ソースコード
t = gets.to_i results = [] t.times{ a,b,c = gets.split.map &:to_i result = 0 if c > a then result += a * 2 c -= a result += c / 2 result += b / 2 * 2 else result += c * 2 a = a - c result += b / 2 * 2 if b % 2 == 1 && a>0 then result += 1 end end results << result } puts results