結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
18,912 KB
testcase_01 AC 14 ms
18,968 KB
testcase_02 AC 13 ms
18,888 KB
testcase_03 WA -
testcase_04 AC 14 ms
18,764 KB
testcase_05 AC 14 ms
18,892 KB
testcase_06 AC 15 ms
18,884 KB
testcase_07 AC 15 ms
18,896 KB
testcase_08 AC 15 ms
18,900 KB
testcase_09 AC 14 ms
18,832 KB
testcase_10 AC 13 ms
18,968 KB
testcase_11 AC 13 ms
18,940 KB
testcase_12 WA -
testcase_13 AC 14 ms
19,052 KB
testcase_14 AC 13 ms
18,980 KB
testcase_15 AC 13 ms
18,744 KB
testcase_16 AC 13 ms
18,944 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
//0<=A,B<=12345
fscanf(STDIN, "%s", $str1);
fscanf(STDIN, "%s", $str2);
//print($str1.'::'.$str2."\n");

// main
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 < 12346) {
        return true;
    }
    return false;
}

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