Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Read input
- n = int(input())
- diagonal_sum = 0
- # Logic
- for index in range(n):
- row_data = input().split()
- diagonal_sum += int(row_data[index])
- # Print output
- print(diagonal_sum)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement