We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Think it as simple,
it's like "even" and "odd" , but everthing depens on gender 'b' and gender 'g'.
Example :
assume that you enter number_of_student = 5, # we need to take 5 marks,
assume marks are like this:
12
23
34
21
26
assume if you give "**b" i.e gender boy ( the program need to add only even index. ) 0,2,4,6,8,10,............etc.
-> for the above output shold be like this : 12 + 34 +26 = 72
or
assume if we give "**g" i.e gender girl ( the program need to add only odd index. ) 1,3,5,7,9,............etc.
-> for the above output shold be like this : 23 + 21 = 44.
I hope this is helpful for you to understand the question.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Students Marks Sum
You are viewing a single comment's thread. Return to all comments →
Think it as simple, it's like "even" and "odd" , but everthing depens on gender 'b' and gender 'g'.
Example : assume that you enter number_of_student = 5, # we need to take 5 marks, assume marks are like this: 12 23 34 21 26 assume if you give "**b" i.e gender boy ( the program need to add only even index. ) 0,2,4,6,8,10,............etc. -> for the above output shold be like this : 12 + 34 +26 = 72 or assume if we give "**g" i.e gender girl ( the program need to add only odd index. ) 1,3,5,7,9,............etc. -> for the above output shold be like this : 23 + 21 = 44.
I hope this is helpful for you to understand the question.