結果

問題 No.1643 Not Substring
ユーザー ああいい
提出日時 2021-12-04 11:58:27
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 399 bytes
コンパイル時間 1,221 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-07-06 17:02:05
合計ジャッジ時間 2,364 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 9 WA * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

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()
0