⌨️
[AtCoder]ABC-361|A - Insert
設問ページ
提出結果
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