Given An Integer M And An Array A Consisting Of N Non Negative Integers