Given an array of integers nums and an integer k, return the length of the longest contiguous subarray whose elements sum to k.
If no such subarray exists, return 0.
nums: a list of integersk: an integer target sumkdef longest_subarray_sum_k(nums, k):