Advertisement
Spocoman

Movie Tickets

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