結果

問題 No.2110 012 Matching
ユーザー とりゐとりゐ
提出日時 2022-10-28 22:11:55
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 193 ms / 2,000 ms
コード長 282 bytes
コンパイル時間 284 ms
コンパイル使用メモリ 87,088 KB
実行使用メモリ 78,148 KB
最終ジャッジ日時 2023-09-20 05:11:50
合計ジャッジ時間 3,727 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,252 KB
testcase_01 AC 150 ms
77,672 KB
testcase_02 AC 172 ms
77,768 KB
testcase_03 AC 159 ms
77,688 KB
testcase_04 AC 184 ms
77,844 KB
testcase_05 AC 170 ms
77,708 KB
testcase_06 AC 167 ms
77,716 KB
testcase_07 AC 192 ms
77,836 KB
testcase_08 AC 122 ms
77,592 KB
testcase_09 AC 134 ms
77,668 KB
testcase_10 AC 193 ms
78,148 KB
testcase_11 AC 76 ms
71,104 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from sys import stdin
input=lambda :stdin.readline()[:-1]

def solve():
  a,b,c=map(int,input().split())
  ans=0
  x=min(a,c)
  ans+=2*x
  c-=x
  a-=x
  
  ans+=2*(b//2)
  b%=2
  
  ans+=(c//2)
  
  if b>0 and a>0:
    ans+=1
  
  print(ans)

for _ in range(int(input())):
  solve()
0