public class Solution {
public string OptimalDivision(int[] nums) {
if (nums.Length == )
{
return "";
}
else if (nums.Length == )
{
return nums[].ToString();
}
else if (nums.Length == )
{
return nums[] + "/" + nums[];
}
else
{
var first = nums[];
var dv = nums[];
StringBuilder sb = new StringBuilder(first + "/(");
for (int i = ; i < nums.Length; i++)
{
sb.Append(nums[i]);
sb.Append("/");
}
sb.Remove(sb.Length - , );
sb.Append(")"); return sb.ToString();
}
}
}
https://leetcode.com/problems/optimal-division/#/description