Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int n;
- cin >> n;
- for (char a = 'B'; a <= 'L'; a += 2) {
- for (char b = 'f'; b >= 'a'; b--) {
- for (char c = 'A'; c <= 'C'; c++) {
- for (int d = 1; d <= 10; d++) {
- for (int e = 10; e > 0; e--) {
- if (--n == 0) {
- cout << "Ticket combination: " << a << b << c << d << e << endl
- << "Prize: " << a + b + c + d + e << " lv.\n";
- return 0;
- }
- }
- }
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement