You are given an array of positive integers price where price[i] denotes the price of the i-th candy and a positive integer k. The store sells baskets containing k distinct candies. The tastiness of a candy basket is defined as the smallest absolute difference between the prices of any two candies in the basket. Your task is to return the maximum tastiness of a candy basket that can be formed by selecting k distinct candies.
Given an array of positive integers nums, find the number of distinct prime factors in the product of all the elements in the array. A prime factor of a number is a number that divides it evenly, and only divisible by 1 and itself. The goal is to calculate the distinct prime factors present in the prime factorization of the product of all elements in nums.
You are given an integer array nums. The xor-beauty of the array is the XOR of the effective values of all possible triplets of indices (i, j, k) where 0 <= i, j, k < n. The effective value for each triplet is calculated as ((nums[i] | nums[j]) & nums[k]).
You are given an array of integers sorted in non-decreasing order. Your task is to determine the maximum count between the number of positive integers and the number of negative integers in the array. Zero is not considered positive or negative.
You are given a list of integers nums and an integer k. In each operation, you choose an index i, increase your score by nums[i], and replace nums[i] with ceil(nums[i] / 3). Apply exactly k operations and return the maximum score you can achieve.