結果
問題 | No.2110 012 Matching |
ユーザー | SI1000-github |
提出日時 | 2022-10-29 11:33:37 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 363 ms / 2,000 ms |
コード長 | 793 bytes |
コンパイル時間 | 519 ms |
コンパイル使用メモリ | 87,068 KB |
実行使用メモリ | 78,800 KB |
最終ジャッジ日時 | 2023-09-20 16:14:53 |
合計ジャッジ時間 | 5,006 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 72 ms
71,328 KB |
testcase_01 | AC | 177 ms
78,800 KB |
testcase_02 | AC | 279 ms
78,484 KB |
testcase_03 | AC | 222 ms
78,756 KB |
testcase_04 | AC | 331 ms
78,388 KB |
testcase_05 | AC | 272 ms
78,660 KB |
testcase_06 | AC | 265 ms
78,520 KB |
testcase_07 | AC | 363 ms
78,628 KB |
testcase_08 | AC | 127 ms
78,436 KB |
testcase_09 | AC | 153 ms
78,476 KB |
testcase_10 | AC | 363 ms
78,384 KB |
testcase_11 | AC | 71 ms
71,220 KB |
ソースコード
#!/usr/bin/python # -*- coding: utf-8 -*- # import from sys import stdin, setrecursionlimit setrecursionlimit(10**8) def int_map(): return map(int,input().split()) def int_list(): return list(map(int,input().split())) def int_mtx(N): x = [list(map(int, stdin.readline().split())) for _ in range(N)] return x def str_mtx(N): x = [list(stdin.readline()[:-1]) for _ in range(N)] return x def print_space(l): return print(" ".join([str(x) for x in l])) """ main code """ T = int(input()) for _ in range(T): a,b,c = int_map() ans = 0 ans += 2*(b//2) b = b%2 m = min(a,c) ans += 2*m a -= m c -= m if a == 0: ans += c//2 print(ans) elif a > 0: ans += min(a,b) print(ans)