⌨️

[AtCoder]ABC-311|A - First ABC

2023/09/25に公開

設問ページ

提出結果

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


def getString():
    return input()


def main():
    n = getInt()
    s = [''] + list(getString())

    print(max([s.index('A'), s.index('B'), s.index('C')]))


if __name__ == "__main__":
    main()

Discussion