結果

問題 No.791 うし数列
ユーザー dyechidyechi
提出日時 2019-03-28 10:22:02
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 180 bytes
コンパイル時間 2,009 ms
コンパイル使用メモリ 32,148 KB
実行使用メモリ 32,272 KB
最終ジャッジ日時 2024-04-20 17:16:51
合計ジャッジ時間 2,399 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
31,208 KB
testcase_01 AC 39 ms
31,156 KB
testcase_02 AC 38 ms
30,976 KB
testcase_03 AC 38 ms
31,208 KB
testcase_04 AC 39 ms
31,112 KB
testcase_05 AC 39 ms
31,000 KB
testcase_06 WA -
testcase_07 AC 38 ms
31,444 KB
testcase_08 AC 40 ms
30,940 KB
testcase_09 AC 39 ms
31,004 KB
testcase_10 AC 37 ms
31,076 KB
testcase_11 AC 39 ms
31,184 KB
testcase_12 AC 41 ms
31,024 KB
testcase_13 AC 39 ms
31,380 KB
testcase_14 AC 38 ms
30,828 KB
testcase_15 AC 37 ms
30,992 KB
testcase_16 AC 39 ms
31,152 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

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

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