結果

問題 No.2110 012 Matching
ユーザー 👑 timitimi
提出日時 2022-10-28 21:37:59
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 380 ms / 2,000 ms
コード長 219 bytes
コンパイル時間 674 ms
コンパイル使用メモリ 87,048 KB
実行使用メモリ 79,112 KB
最終ジャッジ日時 2023-09-20 04:28:17
合計ジャッジ時間 5,009 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,452 KB
testcase_01 AC 193 ms
79,112 KB
testcase_02 AC 295 ms
79,084 KB
testcase_03 AC 237 ms
78,780 KB
testcase_04 AC 344 ms
79,012 KB
testcase_05 AC 282 ms
78,912 KB
testcase_06 AC 276 ms
78,856 KB
testcase_07 AC 380 ms
79,056 KB
testcase_08 AC 136 ms
78,180 KB
testcase_09 AC 165 ms
78,620 KB
testcase_10 AC 372 ms
78,860 KB
testcase_11 AC 76 ms
71,180 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T=int(input())
for _ in range(T):
  a,b,c=map(int,input().split())
  ans=0
  ans+=2*(b//2)
  b=b%2
  ans+=2*min(a,c)
  d=min(a,c)
  a-=d
  c-=d
  if a>0:
    if b==1:
      ans+=1
  else:
    ans+=c//2
  print(ans)
    
0