Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sets = [input(), input()]
- setsLength = [len(sets[0]), len(sets[1])]
- playedCards = 0
- if setsLength[0] < setsLength[1]:
- setMinLength = setsLength[0]
- else:
- setMinLength = setsLength[1]
- while(sets[0][playedCards] == sets[1][playedCards] and playedCards < setMinLength):
- playedCards += 1
- newSetsAreNul = [setsLength[0] - playedCards == 0, setsLength[1] - playedCards == 0]
- if(newSetsAreNul[0] and newSetsAreNul[1]):
- print("=")
- elif(newSetsAreNul[1] or sets[0][playedCards] < sets[1][playedCards]):
- print("1")
- else:
- print("2")
Add Comment
Please, Sign In to add comment