static Output Convert(Input data) { var answer = new Output(); answer.SumResult = data.Sums.Sum() * data.K; answer.MulResult = data.Muls.Aggregate((a, b) => a * b); answer.SortedInputs = Array.ConvertAll(data.Muls, x => (decimal)x) .Concat(data.Sums) .OrderBy(x => x) .ToArray(); return answer; }
public void PostInputData() { inputData = serializer.Deserialize<Input>(GetRequestBody()); WriteResponse(string.Empty); }