結果

問題 No.375 立方体のN等分 (1)
ユーザー tailstails
提出日時 2015-05-05 10:53:25
言語 Perl
(5.38.2)
結果
AC  
実行時間 991 ms / 5,000 ms
コード長 211 bytes
コンパイル時間 213 ms
コンパイル使用メモリ 6,816 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-20 01:21:59
合計ジャッジ時間 5,273 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
6,812 KB
testcase_01 AC 3 ms
6,940 KB
testcase_02 AC 191 ms
6,940 KB
testcase_03 AC 3 ms
6,940 KB
testcase_04 AC 2 ms
6,940 KB
testcase_05 AC 3 ms
6,944 KB
testcase_06 AC 4 ms
6,944 KB
testcase_07 AC 25 ms
6,944 KB
testcase_08 AC 124 ms
6,940 KB
testcase_09 AC 20 ms
6,940 KB
testcase_10 AC 50 ms
6,940 KB
testcase_11 AC 46 ms
6,944 KB
testcase_12 AC 67 ms
6,940 KB
testcase_13 AC 56 ms
6,940 KB
testcase_14 AC 451 ms
6,940 KB
testcase_15 AC 88 ms
6,944 KB
testcase_16 AC 56 ms
6,944 KB
testcase_17 AC 751 ms
6,944 KB
testcase_18 AC 502 ms
6,944 KB
testcase_19 AC 82 ms
6,940 KB
testcase_20 AC 35 ms
6,940 KB
testcase_21 AC 34 ms
6,944 KB
testcase_22 AC 991 ms
6,944 KB
testcase_23 AC 60 ms
6,944 KB
testcase_24 AC 33 ms
6,940 KB
testcase_25 AC 170 ms
6,940 KB
testcase_26 AC 54 ms
6,940 KB
testcase_27 AC 85 ms
6,944 KB
testcase_28 AC 34 ms
6,940 KB
testcase_29 AC 33 ms
6,940 KB
testcase_30 AC 55 ms
6,944 KB
testcase_31 AC 68 ms
6,940 KB
testcase_32 AC 33 ms
6,940 KB
testcase_33 AC 61 ms
6,944 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

$t=$n=<>;
for($i=1;$i*$i*$i<=$n;++$i){
	if($n%$i==0){
		$m=$n/$i;
		for($j=1;$j*$j<=$m;++$j){
			if($m%$j==0){
				$k=$m/$j;
				if($t>$i+$j+$k-3){
					$t=$i+$j+$k-3;
				}
			}
		}
	}
}
print $t," ",$n-1,"\n";
0