Jul-27-2020, 04:17 PM
hey guys! i wrote a program in python 3 and now want to convert the program to python 2.7. i was really unsucessfull at this. can anyone help me out please. below is my program.ignore indendation error.
Input Format :
The first line of input consist of number of test cases,
T.The first line of each test case consist of number of villains and player, N.
The second line of each test case consist of the N space separated strengths of Villains.
The third line of each test case consist of N space separated energy of players.
Input Format :
The first line of input consist of number of test cases,
T.The first line of each test case consist of number of villains and player, N.
The second line of each test case consist of the N space separated strengths of Villains.
The third line of each test case consist of N space separated energy of players.
if __name__ == '__main__': Testcases = int(input()) for i in range(Testcases): N = int(input()) v = list(map(int,input().rstrip().split())) p = list(map(int,input().rstrip().split())) v1= sorted(v) p1= sorted(p) win = 0 for i in range(len(v)): if v1[i] < p1[i]: win +=1 if win == len(v) : print("win") else: print("false")