結果

問題 No.312 置換処理
ユーザー sam_kinosam_kino
提出日時 2016-08-11 14:38:35
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 351 bytes
コンパイル時間 261 ms
コンパイル使用メモリ 31,112 KB
実行使用メモリ 31,516 KB
最終ジャッジ日時 2024-04-25 01:21:39
合計ジャッジ時間 3,094 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
31,216 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 37 ms
31,028 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 37 ms
31,048 KB
testcase_14 AC 35 ms
31,064 KB
testcase_15 AC 38 ms
31,080 KB
testcase_16 AC 36 ms
31,252 KB
testcase_17 AC 35 ms
31,236 KB
testcase_18 AC 37 ms
31,088 KB
testcase_19 AC 38 ms
31,192 KB
testcase_20 AC 35 ms
30,916 KB
testcase_21 AC 37 ms
31,236 KB
testcase_22 AC 34 ms
30,964 KB
testcase_23 AC 33 ms
30,980 KB
testcase_24 AC 35 ms
31,096 KB
testcase_25 AC 34 ms
30,904 KB
testcase_26 WA -
testcase_27 AC 34 ms
31,196 KB
testcase_28 AC 35 ms
30,980 KB
testcase_29 AC 36 ms
31,000 KB
testcase_30 WA -
testcase_31 AC 36 ms
31,088 KB
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 AC 36 ms
31,336 KB
testcase_37 AC 36 ms
31,004 KB
testcase_38 AC 38 ms
31,152 KB
testcase_39 AC 38 ms
31,012 KB
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 AC 37 ms
31,148 KB
testcase_44 AC 37 ms
31,260 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

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

$num=trim(fgets(STDIN));
if($num%3==0){
	echo "3".PHP_EOL;
	exit;
}

if($num%4==0){
	echo "4".PHP_EOL;
	exit;
}

if($num%5==0){
	echo "5".PHP_EOL;
	exit;
}

//----------------------------------
for($i=7;$i<=$num/2;$i+=2){
	if($i%3==0 || $i%5==0){
		break;
	}

	if(($num%$i)==0){
		echo $i.PHP_EOL;
		exit;
	}
}
0