結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー e-teste-test
提出日時 2017-02-14 18:18:07
言語 PHP
(8.3.4)
結果
AC  
実行時間 14 ms / 2,000 ms
コード長 395 bytes
コンパイル時間 91 ms
コンパイル使用メモリ 18,688 KB
実行使用メモリ 19,020 KB
最終ジャッジ日時 2023-08-28 16:51:18
合計ジャッジ時間 998 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
18,888 KB
testcase_01 AC 13 ms
19,008 KB
testcase_02 AC 13 ms
18,900 KB
testcase_03 AC 14 ms
19,004 KB
testcase_04 AC 14 ms
18,928 KB
testcase_05 AC 14 ms
18,856 KB
testcase_06 AC 13 ms
18,924 KB
testcase_07 AC 13 ms
18,920 KB
testcase_08 AC 13 ms
18,760 KB
testcase_09 AC 13 ms
18,896 KB
testcase_10 AC 13 ms
18,756 KB
testcase_11 AC 14 ms
18,812 KB
testcase_12 AC 14 ms
18,744 KB
testcase_13 AC 14 ms
18,960 KB
testcase_14 AC 13 ms
18,944 KB
testcase_15 AC 13 ms
19,020 KB
testcase_16 AC 13 ms
18,992 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
fscanf(STDIN, "%s", $str1);
fscanf(STDIN, "%s", $str2);

if (!checkNum($str1)) { endPg('NG'); };
if (!checkNum($str2)) { endPg('NG'); };
endPg('OK');

function checkNum($val) {
    if ($val !== (string)(int)$val) {
        return false;
    }
    if ($val >= 0 && $val <= 12345) {
        return true;
    }
    return false;
}

function endPg($result) {
    echo $result."\n";
    exit;
}
0