You are given two integers as input "N" and "M" .
You have to distribute "M" candies to "N" children such that each one of them gets atleast one candy after the distribution.
Also , each child should get equal number of candies.
Find maximum number of candies each child can get .
If its not possible to do so , print -1.
Input :
N = 2
M = 5
Output :
2 (You have 5 candies . You can distribute 2 candies to the first child and 2 candies to the second child(you will still be left with one candy and thats fine))
Link to original problem for submitting :
https://www.hackerrank.com/contests/desiqna-oa-practice-contest-00/challenges/a-324