結果
問題 | No.2110 012 Matching |
ユーザー |
![]() |
提出日時 | 2022-10-28 23:12:19 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 1,121 ms / 2,000 ms |
コード長 | 619 bytes |
コンパイル時間 | 2,785 ms |
コンパイル使用メモリ | 74,796 KB |
実行使用メモリ | 58,280 KB |
最終ジャッジ日時 | 2024-07-06 02:25:18 |
合計ジャッジ時間 | 11,237 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 11 |
ソースコード
import static java.lang.System.err;public class Main {public static void main(String[] args) {java.io.PrintWriter out = new java.io.PrintWriter(System.out);new Main(out);out.flush();err.flush();}public Main(java.io.PrintWriter out) {try (java.util.Scanner sc = new java.util.Scanner(System.in)) {int T = sc.nextInt();while(T --> 0) {long A = sc.nextLong(), B = sc.nextLong(), C = sc.nextLong();long ans = Math.min(A, C) * 2;A -= ans / 2;C -= ans / 2;ans += C / 2;ans += B / 2 * 2;B %= 2;ans += Math.min(A, B);out.println(ans);}}}}