⌨️

[AtCoder]ABC-066|B - ss

2022/12/31に公開

設問ページ

提出結果

def getString():
    return input()


def main():
    s = list(getString())

    for i in range(len(s) - 1):
        s.pop(-1)
        l = len(s)

        if l % 2 == 1:
            continue

        if s[:int(l / 2)] == s[int(l / 2) * -1:]:
            print(l)
            break


if __name__ == "__main__":
    main()

Discussion