結果

問題 No.646 逆ピラミッド
ユーザー YukimotoPGYukimotoPG
提出日時 2019-02-13 14:54:09
言語 Java21
(openjdk 21)
結果
AC  
実行時間 138 ms / 2,000 ms
コード長 313 bytes
コンパイル時間 2,049 ms
コンパイル使用メモリ 71,852 KB
実行使用メモリ 55,984 KB
最終ジャッジ日時 2023-10-11 11:12:49
合計ジャッジ時間 4,205 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,960 KB
testcase_01 AC 136 ms
55,856 KB
testcase_02 AC 124 ms
55,740 KB
testcase_03 AC 130 ms
55,924 KB
testcase_04 AC 130 ms
55,688 KB
testcase_05 AC 130 ms
55,832 KB
testcase_06 AC 138 ms
55,788 KB
testcase_07 AC 124 ms
55,612 KB
testcase_08 AC 123 ms
55,984 KB
testcase_09 AC 122 ms
55,980 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

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