結果
問題 | No.437 cwwゲーム |
ユーザー |
|
提出日時 | 2018-11-23 17:31:05 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 376 bytes |
コンパイル時間 | 149 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-10-12 08:49:02 |
合計ジャッジ時間 | 2,711 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 40 WA * 1 |
ソースコード
import sys def f(s,n): ans=n;a=set(s) for i in a: if i=='0':continue for j in a: if i==j:continue else: t=i+j+j;b='' for k in s: if t and k==t[0]:t=t[1:] else:b+=k if not t:ans=max(ans,f(b,n+int(i+j+j))) return ans print(f(input(),0))