We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Please tell me what is wrong with my code. I got output for 6 testcases but failed failed for the last 5 testcases. I was not able to debug it.
# Enter your code here. Read input from STDIN. Print output to STDOUTm=[]d=[]n=int(raw_input())if(n==1):print0exit()for_inrange(n):x,y=raw_input().split(" ")m.append(int(x))d.append(y)o=[]foriinrange(len(m)):try:o.append(int(d[i],m[i]))except:continueif(len(set(o))==1):x=len(o)printint((x*(x-1))/2)else:x=len(o)-len(set(o))printint((x*(x-1))/2)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Jim and the Jokes
You are viewing a single comment's thread. Return to all comments →
Please tell me what is wrong with my code. I got output for 6 testcases but failed failed for the last 5 testcases. I was not able to debug it.