結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー papinianuspapinianus
提出日時 2016-12-01 13:00:06
言語 PHP
(8.3.4)
結果
AC  
実行時間 16 ms / 2,000 ms
コード長 405 bytes
コンパイル時間 621 ms
コンパイル使用メモリ 18,472 KB
実行使用メモリ 19,060 KB
最終ジャッジ日時 2023-08-18 11:14:38
合計ジャッジ時間 2,069 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
18,972 KB
testcase_01 AC 15 ms
18,796 KB
testcase_02 AC 15 ms
18,992 KB
testcase_03 AC 15 ms
18,700 KB
testcase_04 AC 15 ms
18,972 KB
testcase_05 AC 15 ms
19,060 KB
testcase_06 AC 16 ms
19,060 KB
testcase_07 AC 15 ms
18,964 KB
testcase_08 AC 15 ms
18,968 KB
testcase_09 AC 15 ms
18,928 KB
testcase_10 AC 15 ms
18,968 KB
testcase_11 AC 15 ms
18,912 KB
testcase_12 AC 15 ms
18,908 KB
testcase_13 AC 16 ms
18,896 KB
testcase_14 AC 15 ms
18,704 KB
testcase_15 AC 15 ms
18,948 KB
testcase_16 AC 15 ms
18,920 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
if(!isValidTestCase(trim(fgets(STDIN))))
{
    echo "NG".PHP_EOL;
    exit;
}
if(!isValidTestCase(trim(fgets(STDIN))))
{
    echo "NG".PHP_EOL;
    exit;
}
echo "OK".PHP_EOL;

function isValidTestCase($num)
{
    $pattern = '/(^[1-9][0-9]+$)|(^0$)/';
    if(preg_match($pattern, $num) === 0)
    {
        return false;
    }
    if($num > 12345)
    {
        return false;
    }
    return true;
}
0