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, 21.06.2019 22:00
Match the steps of the process to julia's analysis. 1. analyze choices. current costs for making phone calls to foreign countries averages between five and ten cents a minute. 2. determine the goals. julia needs to reduce the cost of telecommunications without reducing her employees' ability to do their jobs. 3. gather data. the corporate computer network will be able to handle the increased traffic that will occur as a result of voip. 4. evaluate the decision. julia will have her it department set up voip in the smallest domestic office. 5. make the decision. julia will have employees document the benefits and problems that result from using the new technology.
Answers: 1
question
Computers and Technology, 23.06.2019 06:10
The head restraint should be adjusted so that it reaches a.the top of your ears b.the base of your skull c.the top of the head
Answers: 1
question
Computers and Technology, 23.06.2019 20:00
Me ajude por favor , coloquei uma senha e não consigo tira-la no chorme
Answers: 2
question
Computers and Technology, 23.06.2019 23:30
Worth 50 points answer them bc i am not sure if i am wrong
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
Social Studies, 31.08.2020 18:01
question
Biology, 31.08.2020 18:01
question
Mathematics, 31.08.2020 18:01
Questions on the website: 13722361