結果

問題 No.632 穴埋め門松列
ユーザー osrgy01osrgy01
提出日時 2021-01-13 10:42:45
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 16 ms / 1,000 ms
コード長 295 bytes
コンパイル時間 247 ms
コンパイル使用メモリ 10,812 KB
実行使用メモリ 7,908 KB
最終ジャッジ日時 2023-08-14 07:52:52
合計ジャッジ時間 1,115 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,872 KB
testcase_01 AC 16 ms
7,908 KB
testcase_02 AC 15 ms
7,808 KB
testcase_03 AC 15 ms
7,764 KB
testcase_04 AC 15 ms
7,768 KB
testcase_05 AC 15 ms
7,788 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=input()
a=[int(i) for i in n.replace('?','4').split()]
b=[int(i) for i in n.replace('?','1').split()]
cnt1=cnt2=0
if min(a)==a[1] or max(a)==a[1]:
    cnt1=1
if min(b)==b[1] or max(b)==b[1]:
    cnt2=1
if cnt1==1 and cnt2==1:
    print(14)
elif cnt1==1:
    print(4)
elif cnt2==1:
    print(1)
0