Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions task_01.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
a = int(input())
b = int(input())
if a > b:
print(b)
else:
print(a)
7 changes: 7 additions & 0 deletions task_02.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
num = int(input())
if num > 0:
print(1)
elif num < 0:
print(-1)
else:
print(0)
10 changes: 10 additions & 0 deletions task_03.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
a = int(input())
b = int(input())
c = int(input())
d = int(input())
sq1 = (a+b) % 2
sq2 = (c+d) % 2
if sq1 == sq2:
print("YES")
else:
print("NO")
5 changes: 5 additions & 0 deletions task_04.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
n = int(input())
if n % 4 == 0 and not n % 100 == 0 or n % 400 == 0:
print("YES")
else:
print("NO")
10 changes: 10 additions & 0 deletions task_05.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
a = int(input())
b = int(input())
c = int(input())

if a <= b and a <= c:
print(a)
elif b <= a and b <= c:
print(b)
else:
print(c)
9 changes: 9 additions & 0 deletions task_06.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
a = int(input())
b = int(input())
c = int(input())
if a == b and a == c:
print(3)
elif a == b and a != c or b == c and a != b or a == c and b != c:
print(2)
else:
print(0)
8 changes: 8 additions & 0 deletions task_07.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
a = int(input())
b = int(input())
c = int(input())
d = int(input())
if a == c or b == d:
print("YES")
else:
print("NO")
10 changes: 10 additions & 0 deletions task_08.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
x1 = int(input())
y1 = int(input())
x2 = int(input())
y2 = int(input())
stepX = (x1-x2)
stepY = (y1 - y2)
if abs(stepX) <= 1 and abs(stepY) <= 1:
print("YES")
else:
print("NO")
10 changes: 10 additions & 0 deletions task_09.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
x1 = int(input())
y1 = int(input())
x2 = int(input())
y2 = int(input())
stepX = (x1-x2)
stepY = (y1 - y2)
if abs(stepX) == abs(stepY):
print('YES')
else:
print('NO')
10 changes: 10 additions & 0 deletions task_10.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
x1 = int(input())
y1 = int(input())
x2 = int(input())
y2 = int(input())
stepX = (x1-x2)
stepY = (y1 - y2)
if abs(stepX) == abs(stepY) or x1 == x2 or y1 == y2:
print('YES')
else:
print('NO')
10 changes: 10 additions & 0 deletions task_11.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
x1 = int(input())
y1 = int(input())
x2 = int(input())
y2 = int(input())
dx = abs(x1 - x2)
dy = abs(y1 - y2)
if dx == 1 and dy == 2 or dx == 2 and dy == 1:
print('YES')
else:
print('NO')
7 changes: 7 additions & 0 deletions task_12.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
n = int(input())
m = int(input())
k = int(input())
if k < n * m and ((k % n == 0) or (k % m == 0)):
print('YES')
else:
print('NO')
15 changes: 15 additions & 0 deletions task_13.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
n = int(input())
m = int(input())
x = int(input())
y = int(input())

if n > m:
n, m = m, n
if x >= n / 2:
x = n - x
if y >= m / 2:
y = m - y
if x < y:
print(x)
else:
print(y)