Created
July 2, 2024 13:39
-
-
Save samarthsewlani/020851af27f32f86399e3aa2844a7437 to your computer and use it in GitHub Desktop.
Compare Triplets HackerRank Solution ( Pyton )
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
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