mirror of
https://git.wolves.top/wolves/leetcode.git
synced 2025-11-04 17:26:32 +08:00
init
This commit is contained in:
9
25/05/2894.go
Normal file
9
25/05/2894.go
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user