結果
| 問題 | No.632 穴埋め門松列 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-01-20 06:40:17 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 83 ms / 1,000 ms |
| コード長 | 345 bytes |
| 記録 | |
| コンパイル時間 | 184 ms |
| コンパイル使用メモリ | 77,184 KB |
| 最終ジャッジ日時 | 2025-12-04 00:54:11 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 |
ソースコード
def ok(x):
if x[0] < x[1] and x[1] > x[2] and x[0] != x[2]:
return True
if x[0] > x[1] and x[1] < x[2] and x[0] != x[2]:
return True
return False
S = raw_input()
A = map(int, S.replace('?', '1').split())
B = map(int, S.replace('?', '4').split())
ans = ''
if ok(A):
ans += '1'
if ok(B):
ans += '4'
print ans