結果

問題 No.791 うし数列
ユーザー HAGI_TAROHAGI_TARO
提出日時 2021-09-14 14:28:48
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 215 bytes
コンパイル時間 878 ms
コンパイル使用メモリ 87,180 KB
実行使用メモリ 80,372 KB
最終ジャッジ日時 2023-09-09 11:18:24
合計ジャッジ時間 3,431 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
70,656 KB
testcase_01 AC 71 ms
70,600 KB
testcase_02 RE -
testcase_03 RE -
testcase_04 AC 70 ms
70,304 KB
testcase_05 RE -
testcase_06 RE -
testcase_07 AC 72 ms
70,680 KB
testcase_08 AC 70 ms
70,784 KB
testcase_09 AC 71 ms
70,312 KB
testcase_10 AC 71 ms
70,804 KB
testcase_11 AC 70 ms
70,692 KB
testcase_12 AC 70 ms
70,680 KB
testcase_13 AC 69 ms
70,652 KB
testcase_14 AC 71 ms
70,300 KB
testcase_15 AC 70 ms
70,428 KB
testcase_16 AC 68 ms
70,684 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = input()
if len(n) == 1 or n[0] != "1":
    print(-1)
else:
    ans = 0
    for i in range(1,len(n)):
        if n[i] == "3":
            ans += 1
        else:
            print(-1)
            exit()
print(ans)
0