C# - 0 additions
using System.Collections.Generic;using System.Linq;static int Divide(int a, int b){ var ints = new List<int>(a); while (ints.Count < a) ints.AddRange(Enumerable.Range(1, b)); return ints.Select((x, i) => x == b && i < a).Count(x => x);}
Populates a list of integers with 1..b
repeated a
times. The number of times b
appears (except for the occurrence with an index >a
) is the result.
I'm not sure if the list is allowed by the rules, but I'm submitting this in the spirit of the other posts which aren't taking the rules all that seriously (after all, not using addition at all is basically bypassing the challenge altogether).