結果

問題 No.646 逆ピラミッド
ユーザー Yosuke YamaguchiYosuke Yamaguchi
提出日時 2021-01-10 21:25:28
言語 Java21
(openjdk 21)
結果
AC  
実行時間 186 ms / 2,000 ms
コード長 513 bytes
コンパイル時間 3,626 ms
コンパイル使用メモリ 77,072 KB
実行使用メモリ 55,204 KB
最終ジャッジ日時 2024-05-01 06:28:51
合計ジャッジ時間 6,166 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 163 ms
54,796 KB
testcase_01 AC 179 ms
55,088 KB
testcase_02 AC 161 ms
54,908 KB
testcase_03 AC 177 ms
54,952 KB
testcase_04 AC 171 ms
54,960 KB
testcase_05 AC 171 ms
54,756 KB
testcase_06 AC 186 ms
55,204 KB
testcase_07 AC 163 ms
54,828 KB
testcase_08 AC 164 ms
55,164 KB
testcase_09 AC 166 ms
55,188 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

// https://yukicoder.me/problems/no/646
public class ReversePyramid646 {
  public static void main(String[] args) {
    // 標準入力から読み込む際に、Scan
    Scanner sc = new Scanner(System.in);

    // String 1つ分を読み込む
    int n = Integer.parseInt(sc.next());
    for (int i = 0; i < n; i++) {
      String number = "";
      int m = n - i;
      for (int j = 0; j < m; j++) {
        number += "" + n;
      }
      System.out.println(number);
    }

  }
}
0