Skip to content

Instantly share code, notes, and snippets.

@RabeyaMuna
Last active April 6, 2020 11:22
Show Gist options
  • Save RabeyaMuna/8bcabcd7fa1035000ad3a60bf4be14a1 to your computer and use it in GitHub Desktop.
Save RabeyaMuna/8bcabcd7fa1035000ad3a60bf4be14a1 to your computer and use it in GitHub Desktop.
Python3
import math
import os
import random
import re
import sys
# Complete the compareTriplets function below.
def compareTriplets(a, b):
c=0
d=0
for i in range (0,len(a)):
if a[i]>b[i]:
c+=1
elif b[i]>a[i]:
d+=1
return str(c) +""+str(d)
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