結果
| 問題 |
No.791 うし数列
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-08-06 11:56:31 |
| 言語 | PHP (843.2) |
| 結果 |
AC
|
| 実行時間 | 36 ms / 2,000 ms |
| コード長 | 203 bytes |
| コンパイル時間 | 66 ms |
| コンパイル使用メモリ | 31,000 KB |
| 実行使用メモリ | 31,536 KB |
| 最終ジャッジ日時 | 2024-07-18 13:52:41 |
| 合計ジャッジ時間 | 1,215 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 15 |
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?php
$input = trim(fgets(STDIN));
$ans=-1;
if(strlen($input)>1){
if(substr_count($input, "3") == strlen($input)-1 && substr($input, 0, 1) == "1") {
$ans= substr_count($input,"3",1);
}
}
echo $ans;