結果
| 問題 |
No.632 穴埋め門松列
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-02-14 16:02:30 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 42 ms / 1,000 ms |
| コード長 | 533 bytes |
| コンパイル時間 | 145 ms |
| コンパイル使用メモリ | 82,592 KB |
| 実行使用メモリ | 52,224 KB |
| 最終ジャッジ日時 | 2024-06-29 06:50:40 |
| 合計ジャッジ時間 | 945 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 |
ソースコード
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")