配列を扱う問題です.
# ITP1_6_A
n = input()
num_list = list(input().split(" "))
num_list = reversed(num_list)
print(" ".join(num_list))
# ITP1_6_B
n = int(input())
cards = [[i+1 for i in range(13)] for _ in range(4)]
for _ in range(n):
mark,num = input().split(" ")
num = int(num)
if mark=="S":
cards[0].remove(num)
elif mark=="H":
cards[1].remove(num)
elif mark=="C":
cards[2].remove(num)
elif mark=="D":
cards[3].remove(num)
for i in range(4):
if i==0:
mark = "S"
elif i==1:
mark = "H"
elif i==2:
mark = "C"
elif i==3:
mark = "D"
for num in cards[i]:
print(mark+" "+str(num))
多次元配列を使えという雰囲気を気にしない場合はこっちの方が断然楽です.
# ITP1_6_B
n = int(input())
cards = [mark+" "+str(num) for mark in ["S","H","C","D"] for num in range(1,14)]
for _ in range(n):
mark,num = input().split(" ")
cards.remove(mark+" "+num)
for card in cards:
print(card)
# ITP1_6_C
n = int(input())
num_list = [[[0 for _ in range(10)] for _ in range(3)] for _ in range(4)]
for _ in range(n):
b,f,r,v = map(int,input().split(" "))
num_list[b-1][f-1][r-1] += v
for b in range(4):
for f in range(3):
print(" ",end="") # 先頭にスペースを入れるのを忘れない
str_list = map(str,num_list[b][f])
print(" ".join(str_list))
# 最後は # がいらない
if b != 3:
print("#"*20)
# ITP1_6_D
n,m = map(int,input().split(" "))
A = []
for _ in range(n):
row = list(map(int,input().split(" ")))
A.append(row)
B = []
for _ in range(m):
num = int(input())
B.append(num)
C = [0 for _ in range(n)]
for i in range(n):
for j in range(m):
C[i] += A[i][j]*B[j]
for num in C:
print(num)