結果
| 問題 |
No.677 10^Nの約数
|
| ユーザー |
asahi32942398
|
| 提出日時 | 2018-04-27 23:20:44 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 145 ms / 2,000 ms |
| コード長 | 754 bytes |
| コンパイル時間 | 2,143 ms |
| コンパイル使用メモリ | 76,596 KB |
| 実行使用メモリ | 41,784 KB |
| 最終ジャッジ日時 | 2024-06-27 22:18:05 |
| 合計ジャッジ時間 | 5,650 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 17 |
ソースコード
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);
}
}
}
asahi32942398