結果
| 問題 |
No.677 10^Nの約数
|
| コンテスト | |
| ユーザー |
Maeda
|
| 提出日時 | 2025-09-08 15:02:32 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 678 bytes |
| コンパイル時間 | 2,738 ms |
| コンパイル使用メモリ | 78,340 KB |
| 実行使用メモリ | 41,948 KB |
| 最終ジャッジ日時 | 2025-09-08 15:02:39 |
| 合計ジャッジ時間 | 6,510 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | WA * 17 |
ソースコード
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
long max = 2147483647;
List<Long> list = new ArrayList<Long>();
for(long i = 0 ; i < n ; i++ ){
for( long j = 0 ; j < n ; j++ ){
double calculation = Math.pow(2,i)*Math.pow(5,j);
long check = (long)calculation;
if(list.size() <= 0 || list.indexOf(check) == -1 ){
list.add(check);
}
}
}
Collections.sort(list);
for (long ans : list) {
System.out.println(ans);
}
}
}
Maeda