Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Make CSP great again
- #include <bits/stdc++.h>
- #define TASK "TESTCODE"
- using namespace std;
- long long a;
- void read()
- {
- cin >> a;
- }
- void solve()
- {
- for (int i = 9; i >= 0; -- i)
- {
- if ((a - i) % 9 == 0)
- {
- long long tmp = (a - i)/9;
- if (tmp > 0)
- {
- cout << tmp*10 + i << ' ';
- }
- }
- }
- cout << '\n';
- }
- int main()
- {
- ios_base::sync_with_stdio(false);
- cin.tie(nullptr);
- //freopen(TASK".INP", "r", stdin);
- //freopen(TASK".OUT", "w", stdout);
- int t = 1;
- bool typetest = true;
- if (typetest)
- {
- cin >> t;
- }
- for (int __ = 1; __ <= t; ++ __)
- {
- cout << "Case " << __ << ": ";
- read();
- solve();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement