input: from typing import List
  
  def find_integer_difference(nums1: List[int], nums2: List[int]) -> int:
      """
      Given two arrays of the same length, nums1 and nums2.
  
      Each element in nums1 differs from the corresponding element in nums2 by an integer x.
  
      This integer x is such that, if added to each element in nums1, results in an array that matches nums2 in terms of values and their frequencies.
  
      Determine and return the integer x.
      
      Examples:
      >>> nums1 = [2,6,4], nums2 = [9,7,5]
      3
      >>> nums1 = [10], nums2 = [5]
      -5
      >>> nums1 = [1,1,1,1], nums2 = [1,1,1,1]
      0
  
      Constraints:
      1 <= nums1.length == nums2.length <= 100
      0 <= nums1[i], nums2[i] <= 1000
      The test cases are designed such that an integer x exists which, when added to all elements in nums1, makes it equal to nums2.
      """
output:     return nums2[0] - nums1[0]