結果

問題 No.632 穴埋め門松列
ユーザー pypypymipypypymi
提出日時 2022-02-14 16:02:30
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 71 ms / 1,000 ms
コード長 533 bytes
コンパイル時間 445 ms
コンパイル使用メモリ 87,284 KB
実行使用メモリ 71,448 KB
最終ジャッジ日時 2023-09-11 16:43:38
合計ジャッジ時間 1,500 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,132 KB
testcase_01 AC 71 ms
71,296 KB
testcase_02 AC 70 ms
71,300 KB
testcase_03 AC 69 ms
71,412 KB
testcase_04 AC 70 ms
71,448 KB
testcase_05 AC 68 ms
71,444 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

carray = input().split()
carray_four = list(map(int,["4" if i=="?"  else i for i in carray ]))
carray_one = list(map(int,["1" if i=="?"  else i for i in carray ]))
condition_four = len(set(carray_four))==3 and ((max(carray_four)==carray_four[1]) or (min(carray_four)==carray_four[1]))
condition_one = len(set(carray_one))==3 and ((max(carray_one)==carray_one[1]) or (min(carray_one)==carray_one[1]))
if condition_four and condition_one:
    print("14")
elif condition_four and not(condition_one):
    print("4")
else:
    print("1")
0