Skip to content

Commit 95e33ca

Browse files
authored
Create solution_7.py
1 parent 205d4be commit 95e33ca

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

problem_1/solution_7.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
3+
q = int(input())
4+
5+
for _ in range(q):
6+
n, m, k = list(map(int, input().split()))
7+
if max([n, m]) > k:
8+
print(-1)
9+
else:
10+
if (n + m) % 2 == 0:
11+
if max([n, m]) % 2 != k % 2:
12+
print(k - 2)
13+
else:
14+
print(k)
15+
else:
16+
print((k - 1));

0 commit comments

Comments
 (0)