2894. Divisible and Non-divisible Sums Difference
You are given positive integers
nandm.Define two integers,
num1andnum2, as follows:
num1: The sum of all integers in the range[1, n]that are not divisible bym.num2: The sum of all integers in the range[1, n]that are divisible bym.Return the integer
num1 - num2.
1 | class Solution { |