subject

Read in an n*m matrix with binary value and output the number of number 1 in each column. Input format:
The first row contains two integers n, m
Then n rows, m integers per row of value 0 or 1

Output format:
m integers, one per line. Each number represents the count of 1 in the corresponding column.

Sample input:
3 5
0 0 1 1 0
0 1 1 0 1
1 0 0 1 0

Sample output:
1
1
2
2
1

Sample input:

5 8

1 1 1 0 0 1 0 1

0 0 1 1 1 0 1 1

1 0 0 1 1 0 1 0

0 0 0 0 1 1 1 1

0 0 1 1 1 1 1 0

HEL PLEASE

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 00:30
At an open or uncontrolled intersection, yield if a. your road is paved and the crossroad is not b. the cross road is paved and yours is not c. you have two or more passengers in your vehicle d. you did not yield in the last intersection
Answers: 1
question
Computers and Technology, 23.06.2019 18:00
What can a word user do with the customize ribbon dialog box? check all that apply. minimize the ribbon add a new tab to the ribbon remove a group from a tab add a group to a tab choose which styles appear choose which fonts appear choose tools to appear in a group
Answers: 1
question
Computers and Technology, 24.06.2019 13:30
In the rgb model, which color is formed by combining the constituent colors? a) black b) brown c) yellow d) white e) blue
Answers: 1
question
Computers and Technology, 24.06.2019 18:00
Why is a multiview sketch drawinf different from other sketches like isometric, two point, and oblique
Answers: 1
You know the right answer?
Read in an n*m matrix with binary value and output the number of number 1 in each column. Input fo...
Questions
question
Mathematics, 17.09.2019 00:30
question
Social Studies, 17.09.2019 00:30
question
Mathematics, 17.09.2019 00:30
question
Chemistry, 17.09.2019 00:30