python to java converter online
class Solution(object):
def distributeCandies(self, candies, num_people):
res = [0 for i in range(num_people)]
index = 0
while candies>0:
res[index%num_people] += min(candies,index+1)
candies-=(index+1)
index+=1
return res
ob1 = Solution()