-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathZadanie 6+
52 lines (36 loc) · 901 Bytes
/
Zadanie 6+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import math
import os
import random
import re
import sys
# Complete the compareTriplets function below.
def compareTriplets(a, b):
x = y = 0
n = k = 0
for n in range(0, len(a)):
while k < len(a):
key = k
value = a[k]
value1 = b[k]
a[key] = value
b[key] = value1
if a[key] > b[k]:
x += 1
k += 1
elif a[key] < b[key]:
y += 1
k += 1
else:
k += 1
return x, y
result = [x, y]
return result
if __name__ == '__main__':
fptr = open(os.environ['OUTPUT_PATH'], 'w')
a = map(int, raw_input().rstrip().split())
b = map(int, raw_input().rstrip().split())
result = compareTriplets(a, b)
fptr.write(' '.join(map(str, result)))
fptr.write('\n')
fptr.close()
check()