Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import "fmt"
- func main() {
- var n int
- fmt.Scanln(&n)
- for n1 := 1; n1 <= 9; n1++ {
- for n2 := 1; n2 <= 9; n2++ {
- for n3 := 1; n3 <= 9; n3++ {
- for n4 := 1; n4 <= 9; n4++ {
- if n % n1 == 0 && n % n2 == 0 && n % n3 == 0 && n % n4 == 0 {
- fmt.Printf("%d%d%d%d ", n1, n2, n3, n4)
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement