⌨️

[AtCoder]ABC-293|A - Swap Odd and Even

2023/08/28に公開

設問ページ

提出結果

def getString():
    return input()


def main():
    s = getString()
    t = ''

    i = 0
    while i < len(s):
        t += (s[i:i+2])[::-1]
        i += 2
    print(t)


if __name__ == "__main__":
    main()

Discussion