- 1
I want to take 2 inputs. why error
7 Respostas
+ 5
Your code requires 3 inputs, not 2
And you can't run codes that requires interactive input in Code Playground.
+ 3
Ok sorry I misunderstood what you mean.
First thing, indent line 11
And give the input on separate line e.g.
3
2
3
4
5
6
7
Try it and tell me how it goes ...
+ 1
to get inputs as:
3
2 3
4 5
6 7
ie:
row_count
row_first
...
row_last
you could do:
n = int(input())
list2d = [
map(int,input().split())
for i in range(n)
]
print(list2d)
0
No bro
0
Like
3
2 3
4 5
6 7
0
Are the test cases
0
It's an infinite loop asking for input. Just added break.
t=int(input())
while t:
n=int(input())
k=int(input())
if n<k:
print(n)
break
else:
for i in range(n):
n=n-k
print(n)
break
t-=1