Created
July 25, 2018 20:13
-
-
Save pritikadasgupta/71df1b1d47fddc82a04b57f258fd0351 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python3 | |
import math | |
import os | |
import random | |
import re | |
import sys | |
# Complete the compareTriplets function below. | |
def compareTriplets(a, b): | |
a_score=0 | |
b_score=0 | |
for i in range(0,len(a)): | |
if a[i] > b[i]: | |
a_score += 1 | |
if a[i] < b[i]: | |
b_score += 1 | |
return [a_score, b_score] | |
if __name__ == '__main__': | |
fptr = open(os.environ['OUTPUT_PATH'], 'w') | |
a = list(map(int, input().rstrip().split())) | |
b = list(map(int, input().rstrip().split())) | |
result = compareTriplets(a, b) | |
fptr.write(' '.join(map(str, result))) | |
fptr.write('\n') | |
fptr.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment