結果

問題 No.1475 時計の歯車Easy
ユーザー yule10syule10s
提出日時 2021-04-17 15:31:43
言語 Java21
(openjdk 21)
結果
AC  
実行時間 211 ms / 2,000 ms
コード長 821 bytes
コンパイル時間 2,063 ms
コンパイル使用メモリ 74,428 KB
実行使用メモリ 58,292 KB
最終ジャッジ日時 2023-09-17 00:44:40
合計ジャッジ時間 10,216 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 211 ms
56,864 KB
testcase_01 AC 198 ms
56,464 KB
testcase_02 AC 120 ms
56,396 KB
testcase_03 AC 139 ms
55,968 KB
testcase_04 AC 145 ms
56,292 KB
testcase_05 AC 141 ms
56,104 KB
testcase_06 AC 130 ms
56,400 KB
testcase_07 AC 131 ms
56,072 KB
testcase_08 AC 142 ms
56,048 KB
testcase_09 AC 152 ms
55,688 KB
testcase_10 AC 160 ms
56,428 KB
testcase_11 AC 153 ms
56,140 KB
testcase_12 AC 146 ms
55,680 KB
testcase_13 AC 121 ms
55,568 KB
testcase_14 AC 134 ms
56,396 KB
testcase_15 AC 150 ms
56,536 KB
testcase_16 AC 143 ms
55,736 KB
testcase_17 AC 144 ms
54,520 KB
testcase_18 AC 128 ms
55,536 KB
testcase_19 AC 135 ms
56,028 KB
testcase_20 AC 132 ms
58,292 KB
testcase_21 AC 147 ms
55,896 KB
testcase_22 AC 120 ms
55,832 KB
testcase_23 AC 118 ms
56,096 KB
testcase_24 AC 118 ms
56,708 KB
testcase_25 AC 120 ms
56,340 KB
testcase_26 AC 133 ms
54,152 KB
testcase_27 AC 126 ms
56,304 KB
testcase_28 AC 152 ms
56,324 KB
testcase_29 AC 142 ms
56,136 KB
testcase_30 AC 149 ms
56,476 KB
testcase_31 AC 135 ms
56,544 KB
testcase_32 AC 148 ms
56,576 KB
testcase_33 AC 139 ms
55,760 KB
testcase_34 AC 145 ms
56,348 KB
testcase_35 AC 132 ms
55,948 KB
testcase_36 AC 145 ms
56,372 KB
testcase_37 AC 138 ms
56,604 KB
testcase_38 AC 120 ms
56,012 KB
testcase_39 AC 133 ms
56,448 KB
testcase_40 AC 141 ms
56,548 KB
testcase_41 AC 152 ms
53,908 KB
testcase_42 AC 148 ms
56,196 KB
testcase_43 AC 132 ms
56,572 KB
testcase_44 AC 147 ms
54,360 KB
testcase_45 AC 150 ms
56,176 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        // System.out.println("n = "+ n);
        for (int i = 0; i < n ; i++) {
            int k = sc.nextInt();
            ArrayList<Integer> parts = new ArrayList<Integer>();
            for (int j = 0; j < k; j++) {
                parts.add(sc.nextInt());
            }
            Collections.sort(parts);
            Collections.reverse(parts);
            int[] tmp = new int[parts.size()];
            parts.toArray();
            for (int value : parts) {
                System.out.print(value);
                System.out.print(" ");
            }
            System.out.print("\n");
        }
    }
}
0