• + 0 comments

    public class Solution {

    // Complete the chocolateFeast function below.
    static int chocolateFeast(int n, int c, int m) 
    {
        int count=0;
        count=n/c;
        int chocolate=count;
        while(chocolate>=m)
        {
          chocolate=chocolate-m+1;
          count++;
        }
        return count;
    }