online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
n = int(input()) a = [int(input()) for i in range(n)] a.append(0) while a[len(a)-1] < max(a): d = round((max(a) - a[len(a)-1]) / 2 + 0.5) a[a.index(max(a))] -= d a[len(a)-1] += d print(a) print('min t = ', max(a))

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