結果
| 問題 | 
                            No.1643 Not Substring
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2021-12-04 12:01:45 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 399 bytes | 
| コンパイル時間 | 141 ms | 
| コンパイル使用メモリ | 12,672 KB | 
| 実行使用メモリ | 10,880 KB | 
| 最終ジャッジ日時 | 2024-07-06 17:05:32 | 
| 合計ジャッジ時間 | 1,649 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 9 WA * 17 | 
ソースコード
S = input()
_max = 0
i = 0
while i < len(S):
    if S[i] != 'a':
        i += 1
        continue
    else:
        count = 1
        j = i + 1
        while j < len(S):
            if S[j] == 'a':
                count += 1
                j += 1
            else:
                break
        if count > _max:_max = count
        i = j + 1
for _ in range(_max + 1):
    print('a',end='')
print()