結果

問題 No.632 穴埋め門松列
コンテスト
ユーザー pluto77
提出日時 2018-01-22 09:20:08
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 79 ms / 1,000 ms
コード長 482 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 140 ms
コンパイル使用メモリ 77,468 KB
最終ジャッジ日時 2025-12-04 00:54:14
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#yuki632

s=map(str,raw_input().split())
if s[1]=='?':
 x=max(int(s[0]),int(s[2]))+1
 y=min(int(s[0]),int(s[2]))-1
 if y>0:
  print str(y)+str(x)
 else:
  print str(x)
elif s[0]=='?':
 if int(s[1])>int(s[2]):
  if int(s[1])-int(s[2])==1:
   print str(int(s[2])-1)
  else:
   print str(int(s[1])-1)
 else:
  print str(int(s[2])+1)
else:
 if int(s[1])>int(s[0]):
  if int(s[1])-int(s[0])==1:
   print str(int(s[0])-1)
  else:
   print str(int(s[1])-1)
 else:
  print str(int(s[0])+1)
0