It is a very easy problem!!!!!!!!
The answer is "N*(M+1)"
Re: It is a very easy problem!!!!!!!!
Posted by
CAHEK 22 Nov 2009 16:12
yeah, it's mega simple problem...
Re: It is a very easy problem!!!!!!!!
Yeah, it's simple but why my answer was wrong?
anyone can help?
Re: It is a very easy problem!!!!!!!!
Give me your code and I will help you
Edited by author 31.01.2015 13:34
Edited by author 31.01.2015 13:34
Re: It is a very easy problem!!!!!!!!
Posted by
Rifat 6 Apr 2015 14:10
why "N*(M+1)" i can't understand pls help
Re: It is a very easy problem!!!!!!!!
"For each integer from 0 to M the function would calculate how many times this number appears in the N-element array..."
Let's say N=2, so you have two-element array.
Let's M=4, so you have to check whether there is any 0,1,2,3 or 4 (since from 0 to M) in each array...
So total lines = 2*(4+1)
Hope, it helped.
Re: It is a very easy problem!!!!!!!!
how could 3 or 4 in the n? cause n = 2 so 3 or 4 are not in the array....for this reason why we don't use if else statement to see whether m is bigger than n or not...but we calculate it straightly?...can you please describe?
Re: It is a very easy problem!!!!!!!!
Posted by
liquid 11 Sep 2016 15:12
because, a box is given as a clue .....
and you have to solve the problem according to that.. i guess :/
Re: It is a very easy problem!!!!!!!!
Thanks, It helps me