結果

問題 No.312 置換処理
ユーザー sam_kinosam_kino
提出日時 2016-08-11 17:38:56
言語 PHP
(8.3.4)
結果
RE  
実行時間 -
コード長 301 bytes
コンパイル時間 242 ms
コンパイル使用メモリ 30,252 KB
実行使用メモリ 31,072 KB
最終ジャッジ日時 2024-04-25 01:28:02
合計ジャッジ時間 3,211 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 RE -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 38 ms
30,544 KB
testcase_23 WA -
testcase_24 AC 39 ms
30,664 KB
testcase_25 RE -
testcase_26 WA -
testcase_27 WA -
testcase_28 RE -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 RE -
testcase_37 RE -
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 WA -
testcase_44 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?PHP
//   cd dot/PHP
//   PHP try.php

$num=trim(fgets(STDIN));

$i=3;
$loop=($num-$num%2)/2;
while($loop>=$i){
	if($num%$i){
		echo $i.PHP_EOL;
		exit;
	}
	$i=gmep_nextprime($i);
}


//----------------------------------
if($num%2==0){
		echo ($num/2).PHP_EOL;
		exit;
}else{
		echo $num.PHP_EOL;
	}
0