結果

問題 No.632 穴埋め門松列
ユーザー kohei2019
提出日時 2022-02-17 22:42:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 34 ms / 1,000 ms
コード長 520 bytes
コンパイル時間 155 ms
コンパイル使用メモリ 82,376 KB
実行使用メモリ 52,352 KB
最終ジャッジ日時 2024-06-29 07:52:29
合計ジャッジ時間 991 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

ls = input().split()
def  ok(lsl):
    if lsl[0] < lsl[1] and lsl[1] > lsl[2] and lsl[0] != lsl[2]:
        return True
    if lsl[0] > lsl[1] and lsl[1] < lsl[2] and lsl[0] != lsl[2]:
        return True
    return False
ans = ''
ls2 = []
for i in range(3):
    if ls[i] == '?':
        ls2.append(1)
    else:
        ls2.append(int(ls[i]))
if ok(ls2):
    ans += '1'
ls2 = []
for i in range(3):
    if ls[i] == '?':
        ls2.append(4)
    else:
        ls2.append(int(ls[i]))
if ok(ls2):
    ans += '4'
print(ans)
0