結果

問題 No.632 穴埋め門松列
ユーザー kohei2019kohei2019
提出日時 2022-02-17 22:42:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 74 ms / 1,000 ms
コード長 520 bytes
コンパイル時間 390 ms
コンパイル使用メモリ 86,888 KB
実行使用メモリ 71,444 KB
最終ジャッジ日時 2023-09-11 17:54:58
合計ジャッジ時間 1,481 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,320 KB
testcase_01 AC 70 ms
71,444 KB
testcase_02 AC 70 ms
71,424 KB
testcase_03 AC 74 ms
71,028 KB
testcase_04 AC 70 ms
71,320 KB
testcase_05 AC 73 ms
71,032 KB
権限があれば一括ダウンロードができます

ソースコード

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