a = []
print("Input:")
n = int(input())
k = int(input())
for i in range(0, n):
a.append(int(input()))
ak = a[k]
a[i] += ak
print("Output:")
print(a[i])
Copyright © 2025 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
a = []
print("Input:")
n = int(input())
k = int(input())
for i in range(0, n):
a.append(int(input()))
ak = a[k]
for i in range(0, n):
a[i] += ak
print("Output:")
for i in range(0, n):
print(a[i])