You are given a list of integers. For each element, determine whether it is a prime number or a composite number. A prime number is a positive integer greater than 1 that has no positive divisors other than 1 and itself. A composite number is a positive integer greater than 1 that is not prime.
Write a function that takes the list and returns a list of strings, where each string is "Prime" if the corresponding number is prime, or "Composite" if it is composite.
def classify_primes(nums: List[int]) -> List[str]:
pass
nums: a list of integers. The list length N satisfies .nums[i] satisfies 1 ≤ nums[i] ≤ 10^6.N. The i-th string is "Prime" if nums[i] is prime, otherwise "Composite".1 ≤ nums[i] ≤ 10^6Input: nums = [541, 37, 113, 5, 10]
Output: ["Prime", "Prime", "Prime", "Prime", "Composite"]
Explanation:
Input: nums = [2, 3, 4, 1]
Output: ["Prime", "Prime", "Composite", "Composite"]
Explanation: