結果

問題 No.437 cwwゲーム
ユーザー ebicochineal
提出日時 2016-10-29 01:15:10
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 254 bytes
コンパイル時間 457 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-10-12 08:28:20
合計ジャッジ時間 2,907 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 40 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

def g(s,t):
 r=''
 for i in s:
  if t and i==t[0]:t=t[1:]
  else:r+=i
 return'e'if t else r
def f(s,n):
 r=n
 for i in range(1,10):
  for j in range(10):
   x=i*100+j*10+j;a=g(s,str(x))
   if i-j and a!='e':r=max(r,f(a,n+x))
 return r
print(f(input(),0))
0