AdventOfCode/Utils/MathTools.cs

11 lines
222 B
C#
Raw Permalink Normal View History

2023-06-11 18:36:02 +00:00
namespace AdventOfCode.Utils;
public static class MathTools
{
public static int GreatCommonDivider(int x, int y)
{
if (x % y == 0)
return y;
return GreatCommonDivider(y, x % y);
}
}