結果

問題 No.677 10^Nの約数
ユーザー motimoti
提出日時 2018-05-20 17:37:37
言語 Perl
(5.38.2)
結果
TLE  
実行時間 -
コード長 316 bytes
コンパイル時間 323 ms
コンパイル使用メモリ 7,104 KB
実行使用メモリ 9,508 KB
最終ジャッジ日時 2023-09-11 00:05:36
合計ジャッジ時間 5,666 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 5 ms
9,508 KB
testcase_01 AC 5 ms
5,112 KB
testcase_02 AC 5 ms
4,916 KB
testcase_03 AC 5 ms
5,132 KB
testcase_04 AC 5 ms
4,996 KB
testcase_05 AC 5 ms
4,956 KB
testcase_06 AC 5 ms
5,008 KB
testcase_07 AC 5 ms
5,160 KB
testcase_08 AC 6 ms
5,204 KB
testcase_09 AC 8 ms
5,016 KB
testcase_10 AC 14 ms
5,204 KB
testcase_11 AC 31 ms
5,132 KB
testcase_12 AC 89 ms
5,176 KB
testcase_13 AC 270 ms
5,160 KB
testcase_14 AC 839 ms
5,200 KB
testcase_15 TLE -
testcase_16 TLE -
testcase_17 -- -
testcase_18 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

#!/usr/bin/env perl

use strict;
use warnings;

my $nn = <>; chomp $nn;
my %h;
my $n = 10 ** $nn;
for (my $i = 1; $i * $i <= $n; $i++) {
  if ($n % $i == 0) {
    $h{$i} = $h{$n/$i} = 1;
  }
}
my @vs;
while (my ($k, $v) = each(%h)) {
  push @vs, $k;
}
@vs = sort {$a <=> $b} @vs;
for my $v (@vs) {
  print "$v\n";
}
0