Advertisement
Spocoman

03. Lucky Numbers

Sep 25th, 2024
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.42 KB | None | 0 0
  1. package main
  2.  
  3. import "fmt"
  4.  
  5. func main() {
  6.     var n int
  7.     fmt.Scanln(&n)
  8.  
  9.     for i := 1; i <= 9; i++ {
  10.         for k := 1; k <= 9; k++ {
  11.             for j := 1; j <= 9; j++ {
  12.                 for x := 1; x <= 9; x++ {
  13.                     if i + k == j + x && n % (i + k) == 0 {
  14.                        fmt.Printf("%d%d%d%d ", i , k , j , x)
  15.                     }
  16.                 }
  17.             }
  18.         }
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement