結果

問題 No.964 2020
ユーザー yukiyuki
提出日時 2020-08-18 11:24:56
言語 Java21
(openjdk 21)
結果
AC  
実行時間 130 ms / 2,020 ms
コード長 701 bytes
コンパイル時間 2,753 ms
コンパイル使用メモリ 73,140 KB
実行使用メモリ 57,760 KB
最終ジャッジ日時 2023-08-02 07:40:24
合計ジャッジ時間 4,238 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
56,112 KB
testcase_01 AC 123 ms
56,196 KB
testcase_02 AC 123 ms
55,772 KB
testcase_03 AC 126 ms
56,024 KB
testcase_04 AC 125 ms
55,688 KB
testcase_05 AC 125 ms
56,120 KB
testcase_06 AC 128 ms
55,992 KB
testcase_07 AC 129 ms
55,972 KB
testcase_08 AC 128 ms
57,760 KB
testcase_09 AC 130 ms
55,900 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.util.Scanner;

public class Main {
	public static void main (String[] args) {
		Scanner in = new Scanner(System.in);
        List<Integer> list = new ArrayList<>();
		int N = in.nextInt();
		int kind = N;
		if(N == 10) {
		    N = 1;
		    kind = 10;
		}
        
        
        for(int i=0; i<kind; i++){
            // Nが9までに達すると、0に戻る
            if(N > 9){
                N = 0;
            }
            list.add(N);
        
            N++;
        }
        for(int i=0; i<kind; i++){
            String num = Integer.toString(list.get(i));
            for(int j=0; j<kind; j++)
                System.out.print(num);
        }
   }

}
0