結果

問題 No.791 うし数列
ユーザー dyechidyechi
提出日時 2019-03-28 10:28:41
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 222 bytes
コンパイル時間 127 ms
コンパイル使用メモリ 30,724 KB
実行使用メモリ 31,304 KB
最終ジャッジ日時 2024-04-20 17:29:06
合計ジャッジ時間 1,700 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
31,304 KB
testcase_01 AC 40 ms
30,844 KB
testcase_02 WA -
testcase_03 AC 41 ms
30,936 KB
testcase_04 AC 41 ms
31,020 KB
testcase_05 AC 41 ms
31,116 KB
testcase_06 AC 41 ms
31,124 KB
testcase_07 AC 41 ms
30,868 KB
testcase_08 AC 41 ms
31,020 KB
testcase_09 AC 41 ms
30,940 KB
testcase_10 AC 41 ms
30,788 KB
testcase_11 AC 40 ms
31,200 KB
testcase_12 AC 40 ms
31,180 KB
testcase_13 AC 41 ms
31,008 KB
testcase_14 AC 40 ms
30,856 KB
testcase_15 AC 40 ms
31,072 KB
testcase_16 AC 43 ms
31,096 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$s = trim(fgets(STDIN));

if (substr_count($s, "3") == strlen($s) - 1 && substr($s, 0, 1) == "1") {
    if (strlen($s) > 1) {
        echo substr_count($s, "3", 1).PHP_EOL;
    }
} else {
    echo "-1".PHP_EOL;
}
?>
0