Skip to content

Instantly share code, notes, and snippets.

@aomnes
Last active June 21, 2017 10:33
Show Gist options
  • Save aomnes/2ed74761babdfd716dc5d6be4e483eee to your computer and use it in GitHub Desktop.
Save aomnes/2ed74761babdfd716dc5d6be4e483eee to your computer and use it in GitHub Desktop.
Test Stage
package main
import "fmt"
func main() {
var count int = 0
s := make([]bool, 120)
for i := 1; i <= 120; i++ {
for j := 0; j < 120; j += i {
s[j] = !s[j]
}
}
for i := 0; i < 120; i++ {
fmt.Println(i, s[i])
if s[i] == true {
count++
}
}
fmt.Println("Count ==> ", count)
//Affiche 10 Turn On.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment