結果

問題 No.632 穴埋め門松列
コンテスト
ユーザー Bioinfo_K
提出日時 2018-01-19 21:37:55
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 158 ms / 1,000 ms
コード長 457 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 531 ms
コンパイル使用メモリ 20,552 KB
実行使用メモリ 15,360 KB
最終ジャッジ日時 2026-05-30 08:25:10
合計ジャッジ時間 2,354 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import sys,collections;sys.setrecursionlimit(10**7)
from operator import itemgetter
def Is(): return [int(x) for x in sys.stdin.readline().split()]
def Ss(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

s = Ss()
ans = []
if s.index("?") == 1:
    print(14)
    exit()
if s.index("?") == 2:
    ans = [1,4]
else:
    ans = [4,1]
s.remove("?")
if s[0] < s[1]:
    print(ans[0])
else:
    print(ans[1])
0