結果

問題 No.964 2020
ユーザー tentententen
提出日時 2020-11-09 20:41:08
言語 Java21
(openjdk 21)
結果
AC  
実行時間 119 ms / 2,020 ms
コード長 479 bytes
コンパイル時間 3,224 ms
コンパイル使用メモリ 71,888 KB
実行使用メモリ 56,508 KB
最終ジャッジ日時 2023-09-29 22:15:21
合計ジャッジ時間 4,008 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
56,444 KB
testcase_01 AC 118 ms
56,028 KB
testcase_02 AC 118 ms
56,320 KB
testcase_03 AC 119 ms
56,096 KB
testcase_04 AC 118 ms
56,040 KB
testcase_05 AC 119 ms
56,088 KB
testcase_06 AC 119 ms
56,376 KB
testcase_07 AC 118 ms
55,872 KB
testcase_08 AC 118 ms
56,508 KB
testcase_09 AC 119 ms
56,368 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        if (n == 1) {
            System.out.println(1);
            return;
        }
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < n; j++) {
                sb.append(j);
            }
        }
        System.out.println(sb.reverse());
    }
}
0