結果

問題 No.632 穴埋め門松列
ユーザー Kaito KoikeKaito Koike
提出日時 2018-02-17 19:27:18
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 14 ms / 1,000 ms
コード長 487 bytes
コンパイル時間 85 ms
コンパイル使用メモリ 10,980 KB
実行使用メモリ 7,964 KB
最終ジャッジ日時 2023-09-06 17:51:51
合計ジャッジ時間 613 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 13 ms
7,784 KB
testcase_01 AC 12 ms
7,964 KB
testcase_02 AC 12 ms
7,880 KB
testcase_03 AC 13 ms
7,800 KB
testcase_04 AC 13 ms
7,916 KB
testcase_05 AC 14 ms
7,924 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

a = input().split(" ")

judge = {"1":0,"4":0}

for i in range(len(a)):
    if a[i] == "?":
        a[i] = "1"
        b = int(a[1]) - int(a[0])
        c = int(a[1]) - int(a[2])
        if b*c > 0:
            judge["1"] = 1

        a[i] = "4"
        b = int(a[1]) - int(a[0])
        c = int(a[1]) - int(a[2])
        if b*c > 0:
            judge["4"] = 1

if judge["1"] == 1 and judge["4"] == 1:
    print(14)
elif judge["1"] == 1 :
    print(1)
elif judge["4"] == 1 :
    print(4)
0