Skip to content

Instantly share code, notes, and snippets.

@Crilou
Created November 8, 2018 20:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Crilou/b16ca5a5bda2323c2f652c0f4818dcc9 to your computer and use it in GitHub Desktop.
Save Crilou/b16ca5a5bda2323c2f652c0f4818dcc9 to your computer and use it in GitHub Desktop.
RELUE
//
package main
import "fmt"
func main() {
var total int
var n int = 1000/3
for i:=1; i<n+1 ; i++ {
total+=i*3
}
n=(1000-1)/5
for i:=1; i<n+1 ; i++ {
total+=i*5
}
n=1000/15
for i:=1; i<n+1 ; i++ {
total-=i*15
}
fmt.Println(total)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment