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() 設問ページ A - Insert AtCoder is a programming contest site for anyone from beginners to experts. We hold weekly programming contests online.