We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Algorithms
- Warmup
- Compare the Triplets
- Discussions
Compare the Triplets
Compare the Triplets
Sort by
recency
|
4309 Discussions
|
Please Login in order to post a comment
}
My code in Rust
This is my code in Python.
Code:
def compareTriplets(a, b):
count_a = 0
count_b = 0
for i in range(3):
if a[i] < b[i]:
count_b += 1
elif a[i] == b[i]:
pass
else:
count_a += 1
x = [int(i) for i in input().split(' ')] y = [int(i) for i in input().split(' ')]
result = compareTriplets(x, y) print(' '.join(str(num) for num in result))
This is my code in JavaScript language