⌨️

[AtCoder]ABC-361|A - Insert

2024/08/19に公開

設問ページ

提出結果

def getIntMap():
    return map(int, input().split())


def getIntList():
    return list(map(int, input().split()))


def main():
    N, K, X = getIntMap()
    A = getIntList()

    b = A[:K] + [X] + A[K:]
    print(" ".join(map(str, b)))


if __name__ == "__main__":
    main()

Discussion