結果

問題 No.2110 012 Matching
ユーザー タコイモタコイモ
提出日時 2022-10-28 21:48:19
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 368 ms / 2,000 ms
コード長 328 bytes
コンパイル時間 557 ms
コンパイル使用メモリ 87,012 KB
実行使用メモリ 78,444 KB
最終ジャッジ日時 2023-09-20 04:41:31
合計ジャッジ時間 5,343 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
70,956 KB
testcase_01 AC 221 ms
78,192 KB
testcase_02 AC 287 ms
78,284 KB
testcase_03 AC 232 ms
78,220 KB
testcase_04 AC 344 ms
78,444 KB
testcase_05 AC 275 ms
78,388 KB
testcase_06 AC 273 ms
78,424 KB
testcase_07 AC 367 ms
78,292 KB
testcase_08 AC 132 ms
78,224 KB
testcase_09 AC 158 ms
78,268 KB
testcase_10 AC 368 ms
78,224 KB
testcase_11 AC 78 ms
71,152 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())
for _ in range(T):
  A,B,C = map(int,input().split())
  ans = 0
  ans +=  B - (B%2)
  B = B%2

  if C <= A:
    A -= C
    ans += 2*C
    
  else:
    print(ans+2*A+((C-A)//2))
    continue
  if B <= A:
    print(ans+B)
    continue
  else:
    print(ans+A)
    continue
    
  

    
    

    
  
            
0