結果

問題 No.791 うし数列
ユーザー GrayCoderGrayCoder
提出日時 2019-02-22 21:40:42
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 13 ms / 2,000 ms
コード長 226 bytes
コンパイル時間 974 ms
コンパイル使用メモリ 10,480 KB
実行使用メモリ 7,964 KB
最終ジャッジ日時 2023-08-16 16:47:03
合計ジャッジ時間 2,095 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 13 ms
7,848 KB
testcase_01 AC 13 ms
7,768 KB
testcase_02 AC 13 ms
7,772 KB
testcase_03 AC 12 ms
7,800 KB
testcase_04 AC 13 ms
7,752 KB
testcase_05 AC 13 ms
7,832 KB
testcase_06 AC 12 ms
7,756 KB
testcase_07 AC 13 ms
7,964 KB
testcase_08 AC 12 ms
7,920 KB
testcase_09 AC 13 ms
7,892 KB
testcase_10 AC 12 ms
7,844 KB
testcase_11 AC 12 ms
7,756 KB
testcase_12 AC 13 ms
7,844 KB
testcase_13 AC 12 ms
7,756 KB
testcase_14 AC 13 ms
7,756 KB
testcase_15 AC 12 ms
7,800 KB
testcase_16 AC 13 ms
7,892 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from sys import stdin

def main():
    N = input()

    ans = -1
    if tuple(set(N[1:])) == ('3',):
        if N[0] in ['1', '3']:
            ans = len(N) - 1
    print(ans)

input = lambda: stdin.readline().rstrip()
main()
0