Solve a math problem and an algorithmic problem.
The math component asks for the number of trailing zeros in n!. The algorithmic component asks for the maximum sum of a non-empty contiguous subarray. Implement solve_tasks(n, nums) and return both results as [trailing_zeros, maximum_subarray_sum].
n is a non-negative integer and nums is a non-empty list of integers. Return a two-element list containing the trailing-zero count and the maximum contiguous-subarray sum.
def solve_tasks(n, nums):