A student wrote all the natural numbers from 2 to 10000 on a blackboard, one after the other. Another student came and erased all the perfect squares from among the numbers written. Another student came and erased all the perfect cubes. If students come this way and erase all the higher powers, find the number of students who erase at least one number.
Sunday, May 17, 2009
Friday, May 1, 2009
Problems of weights
we have some weights....all the wts are in the power of 3 (1,3,9,27,81,243...).Now the user will enter a wt and our task is to find that using which of the given wts we can get the entered wt...
example:wt entered by the user is 19kg
we can make 19 as....27-9+1
hence the output wil be 1,9,27
similarly for 62 81+9-27-1
hence output will be1,9,27,81
example:wt entered by the user is 19kg
we can make 19 as....27-9+1
hence the output wil be 1,9,27
similarly for 62 81+9-27-1
hence output will be1,9,27,81
Subscribe to:
Posts (Atom)