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 a := int('B'); a <= int('L'); a += 2 {
- for b := int('f'); b >= int('a'); b-- {
- for c := int('A'); c <= int('C'); c++ {
- for d := 1; d <= 10; d++ {
- for e := 10; e > 0; e-- {
- n--
- if n == 0 {
- fmt.Printf("Ticket combination: %c%c%c%d%d\n", a, b, c, d, e)
- fmt.Printf("Prize: %d lv.", a + b + c + d + e)
- return
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement