結果
問題 |
No.672 最長AB列
|
ユーザー |
![]() |
提出日時 | 2021-03-11 19:43:41 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 226 bytes |
コンパイル時間 | 215 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 16,384 KB |
最終ジャッジ日時 | 2024-10-13 07:27:02 |
合計ジャッジ時間 | 4,050 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 6 TLE * 1 -- * 9 |
ソースコード
str = input() ans = 0 for i in range(len(str)//2): s = (i+1)*2 for j in range(len(str)-s+1): if str[j:j+s].count('A')==str[j:j+s].count('B'): ans = s break else: continue break print(ans)