⌨️

[AtCoder]ABC-327|A - ab

2023/11/29に公開

設問ページ

提出結果

def getInt():
    return int(input())


def getString():
    return input()


def main():
    n = getInt()
    s = getString()

    print('Yes' if 'ab' in s or 'ba' in s else 'No')


if __name__ == "__main__":
    main()

Discussion