結果

問題 No.677 10^Nの約数
ユーザー watarimaycry2watarimaycry2
提出日時 2019-12-09 22:18:50
言語 Java21
(openjdk 21)
結果
AC  
実行時間 152 ms / 2,000 ms
コード長 948 bytes
コンパイル時間 2,252 ms
コンパイル使用メモリ 74,684 KB
実行使用メモリ 56,496 KB
最終ジャッジ日時 2023-09-05 11:21:48
合計ジャッジ時間 5,874 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
56,140 KB
testcase_01 AC 122 ms
53,884 KB
testcase_02 AC 124 ms
56,136 KB
testcase_03 AC 124 ms
56,232 KB
testcase_04 AC 126 ms
55,832 KB
testcase_05 AC 133 ms
55,780 KB
testcase_06 AC 128 ms
56,192 KB
testcase_07 AC 131 ms
55,864 KB
testcase_08 AC 130 ms
56,048 KB
testcase_09 AC 131 ms
55,840 KB
testcase_10 AC 135 ms
55,972 KB
testcase_11 AC 135 ms
55,924 KB
testcase_12 AC 135 ms
56,212 KB
testcase_13 AC 137 ms
56,496 KB
testcase_14 AC 139 ms
56,240 KB
testcase_15 AC 147 ms
56,404 KB
testcase_16 AC 152 ms
56,032 KB
testcase_17 AC 151 ms
56,136 KB
testcase_18 AC 151 ms
56,000 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
public class Main {
        static Scanner sc = new Scanner(System.in);
        static void myout(Object t){System.out.println(t);}
        static String getStr(){return sc.next();}
        static int getInt(){return sc.nextInt();}
        static Long getLong(){return sc.nextLong();}
        static boolean isNext(){return sc.hasNext();}
        public static void main(String[] args){
          long N = getInt();
          ArrayList<Long> list = new ArrayList<Long>();
          
          for(int i = 0; i <= N; i++){
            for(int j = 0; j <= N; j++){
              list.add((long)(Math.pow(2,i) * Math.pow(5,j)));
            }
          }
          Collections.sort(list,Comparator.naturalOrder());
          for(int i = 0; i < list.size(); i++){
            myout(list.get(i));
          }
          
        }
        //便利メソッド追加枠ここから

        //便利メソッド追加枠ここまで
}
0