+ 1
Find out the row in which total number of positive elements is bigger
N×M First line contains N and M(1<=N, M <=100) Then N lines that contains exactly M numbers each are inputed https://code.sololearn.com/cYHq9Q9PvIXY/?ref=app
5 Antworten
+ 1
Input
2 3
1 -1 3
2 2 2
Output
2
+ 1
I tested the code with your input example and it outputs 2 as expected. Can you give me another input example that isn't working out as it should? I need it for testing ...
+ 1
What are variable <ind> and <cnt>?
0
Output:
Output have to contain the index of the row in which total number of positive elements is bigger.
If in each row we are equal number of positives output "Numbers are equal".
N.B. It's guaranty that only one row at once will have more positive element that others.
0
3 4
1 1 -3 1
-4 2 2 1
1 -2 2 1
Output
Numbers are equal