結果

問題 No.677 10^Nの約数
ユーザー asahi32942398asahi32942398
提出日時 2018-04-27 23:20:44
言語 Java21
(openjdk 21)
結果
AC  
実行時間 163 ms / 2,000 ms
コード長 754 bytes
コンパイル時間 2,124 ms
コンパイル使用メモリ 73,248 KB
実行使用メモリ 56,140 KB
最終ジャッジ日時 2023-09-10 06:49:12
合計ジャッジ時間 5,893 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
55,800 KB
testcase_01 AC 126 ms
55,764 KB
testcase_02 AC 125 ms
56,024 KB
testcase_03 AC 126 ms
55,920 KB
testcase_04 AC 127 ms
55,876 KB
testcase_05 AC 129 ms
55,744 KB
testcase_06 AC 131 ms
55,464 KB
testcase_07 AC 134 ms
56,004 KB
testcase_08 AC 131 ms
53,888 KB
testcase_09 AC 131 ms
55,768 KB
testcase_10 AC 134 ms
55,856 KB
testcase_11 AC 139 ms
55,792 KB
testcase_12 AC 140 ms
55,720 KB
testcase_13 AC 139 ms
56,140 KB
testcase_14 AC 140 ms
55,800 KB
testcase_15 AC 148 ms
54,248 KB
testcase_16 AC 147 ms
56,072 KB
testcase_17 AC 163 ms
55,992 KB
testcase_18 AC 156 ms
55,824 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
       
        List<Long> list = new ArrayList<>();
       for(long i=0;i<n+1;i++){
            for(long j=0;j<n+1;j++){
                long two =1;
                long five = 1;
                if(i!=0){
                for(int tc=0;tc<i;tc++){
                 two *=2;
                }
            }
            if(j!=0){
                for(int fc=0;fc<j;fc++){
                five *= 5;
                }
            }
                list.add(two*five);
            }
        }
       Collections.sort(list);
       for(long m:list){
           System.out.println(m);
       }
    }
}
0