This commit is contained in:
2025-09-15 21:12:04 +08:00
commit 3f58f483ff
144 changed files with 5298 additions and 0 deletions

9
25/05/2894.go Normal file
View File

@@ -0,0 +1,9 @@
package main
func differenceOfSums(n int, m int) int {
nums2 := 0
for i := 0; i*m <= n; i++ {
nums2 += i * m
}
return n*(n+1)/2 - nums2*2
}