結果

問題 No.791 うし数列
ユーザー todo_2mariko
提出日時 2019-03-07 11:34:02
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 372 bytes
コンパイル時間 81 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-06-23 14:47:37
合計ジャッジ時間 1,299 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 14 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

a = list(input())
b = set(a)

def start_1_3(l):
    if len(l)>1:
        if l[0]=='1' and l[1]=='3':
            return True
        else:
            return False
    else:
        return False
        
def count_3(l, s):
    if len(s) == 2:
        return len(l)-1
    else:
        return '-1'
        
if start_1_3(a):
    print(count_3(a, b))
else:
    print(-1)
    
0