結果

問題 No.36 素数が嫌い!
ユーザー 37zigen37zigen
提出日時 2016-05-05 16:41:09
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 199 bytes
コンパイル時間 218 ms
コンパイル使用メモリ 32,272 KB
実行使用メモリ 32,532 KB
最終ジャッジ日時 2024-04-15 13:17:23
合計ジャッジ時間 5,426 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
32,400 KB
testcase_01 AC 45 ms
32,276 KB
testcase_02 AC 41 ms
32,400 KB
testcase_03 AC 42 ms
32,528 KB
testcase_04 WA -
testcase_05 AC 41 ms
32,528 KB
testcase_06 AC 44 ms
32,532 KB
testcase_07 AC 45 ms
32,212 KB
testcase_08 AC 41 ms
32,276 KB
testcase_09 AC 41 ms
32,276 KB
testcase_10 AC 40 ms
32,144 KB
testcase_11 AC 385 ms
32,216 KB
testcase_12 AC 1,119 ms
32,400 KB
testcase_13 WA -
testcase_14 AC 45 ms
32,340 KB
testcase_15 AC 41 ms
32,400 KB
testcase_16 AC 41 ms
32,400 KB
testcase_17 AC 41 ms
32,276 KB
testcase_18 AC 41 ms
32,528 KB
testcase_19 AC 41 ms
32,400 KB
testcase_20 AC 48 ms
32,272 KB
testcase_21 AC 40 ms
32,404 KB
testcase_22 AC 41 ms
32,400 KB
testcase_23 AC 41 ms
32,404 KB
testcase_24 AC 76 ms
32,404 KB
testcase_25 AC 41 ms
32,532 KB
testcase_26 AC 123 ms
32,016 KB
testcase_27 AC 45 ms
32,400 KB
testcase_28 AC 123 ms
32,400 KB
testcase_29 AC 45 ms
32,016 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$n=trim(fgets(STDIN));
$f_count=0;
for($i=2;$i*$i<=$n;$i++){
	while($n%$i==0){
		$f_count++;
		$n/=$i;
		if($f_count>1)break 2;
	}
}
if($f_count>1)echo "YES".PHP_EOL;
else echo "NO".PHP_EOL;
?>
0