Skip to content

Instantly share code, notes, and snippets.

View andriiburka's full-sized avatar
☑️
Nope

Andrii Burka andriiburka

☑️
Nope
View GitHub Profile
# 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)))
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)))
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)):
# QUEUES
from collections import deque
total_liters = int(input())
people = deque()
while True:
# Name or END command
cmd = input()
if cmd == "Start":
@andriiburka
andriiburka / MY_FINAL_EXAM_01_Password_Reset.py
Created April 5, 2020 15:26
My Final Exam of Python Fundamentals 2020
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:
'''
90/100
'''
skill = input()
while True:
command = input()
if "For Azeroth" in command:
break
'''
/\\\\\\\\\ /\\\
/\\////////\\\ \/\\\
/\\\ \/\\\ \/\\\ /\\\ /\\\
\/\\\ \/\\\ /\\/\\\\\\ \/\\\ /\\/\\\\\\\ \/// \///
\/\\\\\\\\\\\\\\\ \/\\\////\\\ /\\\\\\\\\ \/\\\/////\\\ /\\\ /\\\
\/\\\/////////\\\ \/\\\ \//\\\ /\\\////\\\ \/\\\ \/// \/\\\ \/\\\
\/\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/\\\
\/\\\ \/\\\ \/\\\ \/\\\ \//\\\\\\\/\\ \/\\\ \/\\\ \/\\\
\/// \/// \/// \/// \///////\// \/// \/// \///
@andriiburka
andriiburka / 01_Concert.py
Created March 24, 2020 10:42
Concert.py 90/100
'''
/\\\\\\\\\ /\\\
/\\////////\\\ \/\\\
/\\\ \/\\\ \/\\\ /\\\ /\\\
\/\\\ \/\\\ /\\/\\\\\\ \/\\\ /\\/\\\\\\\ \/// \///
\/\\\\\\\\\\\\\\\ \/\\\////\\\ /\\\\\\\\\ \/\\\/////\\\ /\\\ /\\\
\/\\\/////////\\\ \/\\\ \//\\\ /\\\////\\\ \/\\\ \/// \/\\\ \/\\\
\/\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/\\\ \/\\\
\/\\\ \/\\\ \/\\\ \/\\\ \//\\\\\\\/\\ \/\\\ \/\\\ \/\\\
\/// \/// \/// \/// \///////\// \/// \/// \///
@andriiburka
andriiburka / 01_Concert.py
Created March 24, 2020 07:18
01_Concert 90/100
'''
_____/\\\\\\\\\____________________________/\\\___________________________________________
___/\\\\\\\\\\\\\_________________________\/\\\__________________________________________
__/\\\/////////\\\________________________\/\\\___________________/\\\___/\\\___________
_\/\\\_______\/\\\___/\\/\\\\\\___________\/\\\____/\\/\\\\\\\___\///___\///___________
_____\/\\\\\\\\\\\\\\\__\/\\\////\\\_____/\\\\\\\\\___\/\\\/////\\\___/\\\___/\\\_________
_\/\\\/////////\\\__\/\\\__\//\\\___/\\\////\\\___\/\\\___\///___\/\\\__\/\\\________
___\/\\\_______\/\\\__\/\\\___\/\\\__\/\\\__\/\\\___\/\\\__________\/\\\__\/\\\_______
_\/\\\_______\/\\\__\/\\\___\/\\\__\//\\\\\\\/\\__\/\\\__________\/\\\__\/\\\______
_________\///________\///___\///____\///____\///////\//___\///___________\///___\///______
'''
_____/\\\\\\\\\____________________________/\\\___________________________________________
___/\\\\\\\\\\\\\_________________________\/\\\__________________________________________
__/\\\/////////\\\________________________\/\\\___________________/\\\___/\\\___________
_\/\\\_______\/\\\___/\\/\\\\\\___________\/\\\____/\\/\\\\\\\___\///___\///___________
_____\/\\\\\\\\\\\\\\\__\/\\\////\\\_____/\\\\\\\\\___\/\\\/////\\\___/\\\___/\\\_________
_\/\\\/////////\\\__\/\\\__\//\\\___/\\\////\\\___\/\\\___\///___\/\\\__\/\\\________
___\/\\\_______\/\\\__\/\\\___\/\\\__\/\\\__\/\\\___\/\\\__________\/\\\__\/\\\_______
_\/\\\_______\/\\\__\/\\\___\/\\\__\//\\\\\\\/\\__\/\\\__________\/\\\__\/\\\______
_________\///________\///___\///____\///____\///////\//___\///___________\///___\///______