You are viewing a single comment's thread. Return to all comments →
A = list(map(int, raw_input().strip().split())) B = list(map(int, raw_input().strip().split())) Ascore = len([1 for a,b in zip(A,B) if a>b]) Bscore = len([1 for a,b in zip(A,B) if b>a]) print Ascore, Bscore
Above code will work for any length of vector. You can use sum instead of len as well.
Seems like cookies are disabled on this browser, please enable them to open this website
Compare the Triplets
You are viewing a single comment's thread. Return to all comments →
Above code will work for any length of vector. You can use sum instead of len as well.