結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー papinianuspapinianus
提出日時 2016-12-01 13:00:06
言語 PHP
(8.3.4)
結果
AC  
実行時間 39 ms / 2,000 ms
コード長 405 bytes
コンパイル時間 1,296 ms
コンパイル使用メモリ 30,708 KB
実行使用メモリ 31,384 KB
最終ジャッジ日時 2024-05-05 16:35:36
合計ジャッジ時間 1,926 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
31,384 KB
testcase_01 AC 36 ms
30,820 KB
testcase_02 AC 36 ms
31,092 KB
testcase_03 AC 37 ms
31,312 KB
testcase_04 AC 39 ms
31,008 KB
testcase_05 AC 36 ms
30,872 KB
testcase_06 AC 37 ms
30,916 KB
testcase_07 AC 37 ms
31,004 KB
testcase_08 AC 37 ms
31,316 KB
testcase_09 AC 36 ms
31,128 KB
testcase_10 AC 37 ms
31,036 KB
testcase_11 AC 39 ms
31,036 KB
testcase_12 AC 37 ms
31,112 KB
testcase_13 AC 38 ms
31,168 KB
testcase_14 AC 37 ms
31,112 KB
testcase_15 AC 36 ms
31,024 KB
testcase_16 AC 37 ms
31,136 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