結果
| 問題 |
No.2110 012 Matching
|
| コンテスト | |
| ユーザー |
tamato
|
| 提出日時 | 2022-10-28 21:26:48 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 129 ms / 2,000 ms |
| コード長 | 458 bytes |
| コンパイル時間 | 156 ms |
| コンパイル使用メモリ | 82,368 KB |
| 実行使用メモリ | 76,416 KB |
| 最終ジャッジ日時 | 2024-07-06 00:25:10 |
| 合計ジャッジ時間 | 2,639 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 11 |
ソースコード
mod = 998244353
def main():
import sys
input = sys.stdin.readline
for _ in range(int(input())):
a, b, c = map(int, input().split())
ans = 0
ans += (b // 2) * 2
b %= 2
x = min(a, c)
ans += 2 * x
a -= x
c -= x
y = min(a, b)
ans += y
a -= y
b -= y
ans += (c // 2)
c %= 2
print(ans)
if __name__ == '__main__':
main()
tamato