結果

問題 No.312 置換処理
ユーザー papinianuspapinianus
提出日時 2016-09-21 13:05:33
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 210 bytes
コンパイル時間 95 ms
コンパイル使用メモリ 31,432 KB
実行使用メモリ 31,320 KB
最終ジャッジ日時 2024-04-28 16:43:16
合計ジャッジ時間 3,399 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
30,760 KB
testcase_01 WA -
testcase_02 AC 106 ms
31,024 KB
testcase_03 WA -
testcase_04 AC 40 ms
30,784 KB
testcase_05 AC 41 ms
30,620 KB
testcase_06 AC 43 ms
30,620 KB
testcase_07 AC 58 ms
30,516 KB
testcase_08 AC 40 ms
30,740 KB
testcase_09 AC 42 ms
30,636 KB
testcase_10 AC 41 ms
30,728 KB
testcase_11 AC 47 ms
30,816 KB
testcase_12 AC 41 ms
30,736 KB
testcase_13 AC 40 ms
30,908 KB
testcase_14 AC 41 ms
30,640 KB
testcase_15 AC 40 ms
30,804 KB
testcase_16 AC 41 ms
30,644 KB
testcase_17 AC 40 ms
30,652 KB
testcase_18 AC 41 ms
30,572 KB
testcase_19 AC 40 ms
31,004 KB
testcase_20 AC 41 ms
30,688 KB
testcase_21 AC 40 ms
30,692 KB
testcase_22 AC 41 ms
30,820 KB
testcase_23 AC 41 ms
30,824 KB
testcase_24 AC 41 ms
30,644 KB
testcase_25 WA -
testcase_26 AC 41 ms
30,600 KB
testcase_27 WA -
testcase_28 AC 40 ms
30,992 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 40 ms
30,652 KB
testcase_32 AC 47 ms
30,840 KB
testcase_33 AC 61 ms
30,748 KB
testcase_34 AC 61 ms
31,040 KB
testcase_35 AC 44 ms
30,944 KB
testcase_36 AC 40 ms
30,768 KB
testcase_37 AC 41 ms
30,548 KB
testcase_38 AC 41 ms
30,696 KB
testcase_39 AC 41 ms
30,780 KB
testcase_40 AC 41 ms
30,936 KB
testcase_41 AC 41 ms
30,900 KB
testcase_42 AC 41 ms
30,952 KB
testcase_43 AC 42 ms
30,832 KB
testcase_44 AC 40 ms
30,872 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$num = trim(fgets(STDIN));
$root = floor(sqrt($num));
$ans = 0;
for($i = 3;$i <= $root; $i++)
{
    if(!($num % $i))
    {
        $ans = $i;
        break;
    }
}
echo ($ans == 0)?$num:$i;
echo PHP_EOL;
0