This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# v2 | |
matrix = [list(map(int, input().split())) for _ in range(int(input()))] | |
diagonal1 = [(matrix[i][i]) for i in range(len(matrix))] | |
diagonal2 = [(matrix[i][(len(matrix)-i-1)]) for i in range(len(matrix))] | |
print(abs(sum(diagonal1) - sum(diagonal2))) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
matrix = [list(map(int, input().split())) for _ in range(int(input()))] | |
diagonal1 = [(matrix[i][i]) for i in range(len(matrix))] | |
diagonal2 = [matrix[i[0]][i[1]] for i in tuple( | |
zip([h for h in range(len(matrix))], [v for v in range(len(matrix) - 1, -1, -1)]))] | |
print(abs(sum(diagonal1) - sum(diagonal2))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r, c = input().split(', ') | |
matrix = [] | |
for i in range(int(r)): | |
matrix.append(input().split(', ')) | |
max1, max2 = 0, 0 | |
for li in matrix: | |
for i in range(len(li)): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# QUEUES | |
from collections import deque | |
total_liters = int(input()) | |
people = deque() | |
while True: | |
# Name or END command | |
cmd = input() | |
if cmd == "Start": |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string = input() | |
while True: | |
command = input().split() | |
if "Done" in command: | |
break | |
elif "TakeOdd" in command: | |
temp = '' | |
for i in range(len(string)): | |
if i % 2 == 1: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
90/100 | |
''' | |
skill = input() | |
while True: | |
command = input() | |
if "For Azeroth" in command: | |
break |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
/\\\\\\\\\ /\\\ | |
/\\////////\\\ \/\\\ | |
/\\\ \/\\\ \/\\\ /\\\ /\\\ | |
\/\\\ \/\\\ /\\/\\\\\\ \/\\\ /\\/\\\\\\\ \/// \/// | |
\/\\\\\\\\\\\\\\\ \/\\\////\\\ /\\\\\\\\\ \/\\\/////\\\ /\\\ /\\\ | |
\/\\\/////////\\\ \/\\\ \//\\\ /\\\////\\\ \/\\\ \/// \/\\\ \/\\\ | |
\/\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/\\\ | |
\/\\\ \/\\\ \/\\\ \/\\\ \//\\\\\\\/\\ \/\\\ \/\\\ \/\\\ | |
\/// \/// \/// \/// \///////\// \/// \/// \/// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
/\\\\\\\\\ /\\\ | |
/\\////////\\\ \/\\\ | |
/\\\ \/\\\ \/\\\ /\\\ /\\\ | |
\/\\\ \/\\\ /\\/\\\\\\ \/\\\ /\\/\\\\\\\ \/// \/// | |
\/\\\\\\\\\\\\\\\ \/\\\////\\\ /\\\\\\\\\ \/\\\/////\\\ /\\\ /\\\ | |
\/\\\/////////\\\ \/\\\ \//\\\ /\\\////\\\ \/\\\ \/// \/\\\ \/\\\ | |
\/\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/\\\ | |
\/\\\ \/\\\ \/\\\ \/\\\ \//\\\\\\\/\\ \/\\\ \/\\\ \/\\\ | |
\/// \/// \/// \/// \///////\// \/// \/// \/// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
_____/\\\\\\\\\____________________________/\\\___________________________________________ | |
___/\\\\\\\\\\\\\_________________________\/\\\__________________________________________ | |
__/\\\/////////\\\________________________\/\\\___________________/\\\___/\\\___________ | |
_\/\\\_______\/\\\___/\\/\\\\\\___________\/\\\____/\\/\\\\\\\___\///___\///___________ | |
_____\/\\\\\\\\\\\\\\\__\/\\\////\\\_____/\\\\\\\\\___\/\\\/////\\\___/\\\___/\\\_________ | |
_\/\\\/////////\\\__\/\\\__\//\\\___/\\\////\\\___\/\\\___\///___\/\\\__\/\\\________ | |
___\/\\\_______\/\\\__\/\\\___\/\\\__\/\\\__\/\\\___\/\\\__________\/\\\__\/\\\_______ | |
_\/\\\_______\/\\\__\/\\\___\/\\\__\//\\\\\\\/\\__\/\\\__________\/\\\__\/\\\______ | |
_________\///________\///___\///____\///____\///////\//___\///___________\///___\///______ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
_____/\\\\\\\\\____________________________/\\\___________________________________________ | |
___/\\\\\\\\\\\\\_________________________\/\\\__________________________________________ | |
__/\\\/////////\\\________________________\/\\\___________________/\\\___/\\\___________ | |
_\/\\\_______\/\\\___/\\/\\\\\\___________\/\\\____/\\/\\\\\\\___\///___\///___________ | |
_____\/\\\\\\\\\\\\\\\__\/\\\////\\\_____/\\\\\\\\\___\/\\\/////\\\___/\\\___/\\\_________ | |
_\/\\\/////////\\\__\/\\\__\//\\\___/\\\////\\\___\/\\\___\///___\/\\\__\/\\\________ | |
___\/\\\_______\/\\\__\/\\\___\/\\\__\/\\\__\/\\\___\/\\\__________\/\\\__\/\\\_______ | |
_\/\\\_______\/\\\__\/\\\___\/\\\__\//\\\\\\\/\\__\/\\\__________\/\\\__\/\\\______ | |
_________\///________\///___\///____\///____\///////\//___\///___________\///___\///______ |