online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
n, m = map(int, input().split()) score={i: 0 for i in range(1, m + 1)} for _ in range(n): ans, *arr = input().rstrip().split() i=0 while i<len(arr)-1: if (arr[i + 1]).isdigit():i+=1 elif arr[i+1].strip()==ans.strip(): score[int(arr[i])] += 1 i+=2 break else: i+=2 max_score = max(score.values()) print(" ".join(str(i) for i in range(1, m + 1) if score[i]==max_score)) print("\n".join(f"{i} {score[i]}" for i in range(1, m + 1)))

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue