結果

問題 No.632 穴埋め門松列
ユーザー turner18_jp
提出日時 2018-03-15 21:32:22
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 35 ms / 1,000 ms
コード長 371 bytes
コンパイル時間 105 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-12-21 13:02:26
合計ジャッジ時間 1,015 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

s = list(input().split())
pos = s.index('?')
ans = ""
one = s.copy()
one[pos] = 1
one = list(map(int, one))
four = s.copy()
four[pos] = 4
four = list(map(int, four))

if one[1] > one[0] and one[1] > one[2] or one[1] < one[0] and one[1] < one[2]:
  ans += '1'

if four[1] > four[0] and four[1] > four[2] or four[1] < four[0] and four[1] < four[2]:
  ans += '4'

print(ans)
0