結果
問題 |
No.672 最長AB列
|
ユーザー |
![]() |
提出日時 | 2018-05-30 17:03:04 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 219 bytes |
コンパイル時間 | 100 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 22,328 KB |
最終ジャッジ日時 | 2024-06-30 08:16:15 |
合計ジャッジ時間 | 4,168 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 6 TLE * 1 -- * 9 |
ソースコード
inp=list(input()) n=len(inp) for i in range(n): inp[i]=inp[i]=="A" sl=int(n/2)*2 s=0 while True: st=inp[s:s+sl] if sum(st)==(sl/2): break s+=1 if (s+sl)>n: sl-=2 s=0 print(sl)