[LeetCode] 2470. Number of Subarrays With LCM Equal to K

1 · Rain Hu · Nov. 29, 2022, 5:34 p.m.
2470. Number of Subarrays With LCM Equal to K Hardness: \(\color{orange}\textsf{Medium}\) Ralated Topics: Array、Math、Number Theory \(\color{blue}\textsf{weekly Contest 319}\) 一、題目 Given an integer array nums and an integer k, return the number of subarrays of nums where the least common multiple of the subarray’s elements is k. A subarray is a contiguous non-empty sequence of elements within an array. The least common multiple of an array is the smallest positive integer that is divisible by all...