結果

問題 No.2773 Wake up Record 1
ユーザー Theta
提出日時 2024-07-10 15:00:09
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 68 ms / 2,000 ms
コード長 297 bytes
コンパイル時間 346 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 77,184 KB
最終ジャッジ日時 2024-07-10 15:00:13
合計ジャッジ時間 3,113 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import pairwise


def main():
    N = int(input())
    S = input()
    ans = []
    for idx, (prev, next_) in enumerate(pairwise(S), 2):
        if prev == "x" and next_ == "o":
            ans.append(idx)
    print(len(ans))
    print(*ans)


if __name__ == "__main__":
    main()
0