結果

問題 No.677 10^Nの約数
ユーザー takeya_okinotakeya_okino
提出日時 2019-08-19 20:50:55
言語 Java21
(openjdk 21)
結果
AC  
実行時間 163 ms / 2,000 ms
コード長 489 bytes
コンパイル時間 2,922 ms
コンパイル使用メモリ 77,140 KB
実行使用メモリ 54,572 KB
最終ジャッジ日時 2024-04-15 09:17:52
合計ジャッジ時間 6,138 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 138 ms
53,880 KB
testcase_01 AC 135 ms
53,936 KB
testcase_02 AC 139 ms
54,120 KB
testcase_03 AC 140 ms
54,136 KB
testcase_04 AC 142 ms
53,896 KB
testcase_05 AC 145 ms
54,088 KB
testcase_06 AC 147 ms
54,132 KB
testcase_07 AC 148 ms
54,260 KB
testcase_08 AC 145 ms
53,904 KB
testcase_09 AC 143 ms
54,228 KB
testcase_10 AC 148 ms
54,072 KB
testcase_11 AC 152 ms
54,276 KB
testcase_12 AC 152 ms
53,948 KB
testcase_13 AC 151 ms
54,116 KB
testcase_14 AC 154 ms
53,940 KB
testcase_15 AC 155 ms
54,168 KB
testcase_16 AC 157 ms
54,456 KB
testcase_17 AC 162 ms
54,572 KB
testcase_18 AC 163 ms
54,236 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    ArrayList<Long> list = new ArrayList<Long>();
    for(int i = 0; i <= n; i++) {
      for(int j = 0; j <= n; j++) {
        long t = (long)Math.pow(2, i) * (long)Math.pow(5, j);
        list.add(t);
      }
    }
    Collections.sort(list);
    for(int i = 0; i < list.size(); i++) {
      System.out.println(list.get(i));
    }
  }
}
0