結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
31,184 KB
testcase_01 WA -
testcase_02 AC 38 ms
31,028 KB
testcase_03 WA -
testcase_04 AC 39 ms
30,936 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 38 ms
30,864 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 36 ms
31,024 KB
testcase_13 AC 39 ms
31,004 KB
testcase_14 AC 40 ms
31,000 KB
testcase_15 AC 39 ms
31,232 KB
testcase_16 AC 37 ms
30,988 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