Skip to content

Instantly share code, notes, and snippets.

@samarthsewlani
Created July 2, 2024 13:39
Show Gist options
  • Save samarthsewlani/020851af27f32f86399e3aa2844a7437 to your computer and use it in GitHub Desktop.
Save samarthsewlani/020851af27f32f86399e3aa2844a7437 to your computer and use it in GitHub Desktop.
Compare Triplets HackerRank Solution ( Pyton )
n = 3
alice = [int(x) for x in input().split()]
bob = [int(x) for x in input().split()]
aliceScore, bobScore = 0, 0
for i in range(n):
a, b = alice[i], bob[i]
if(a>b):
aliceScore+=1
elif(b>a):
bobScore+=1
print(aliceScore, bobScore)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment