###### tags: `CPE` # *2022/05/24 CPE_01* ## 題目:  ``` #include <iostream> #include <vector> using namespace std; int main() { long long num_1, num_2; vector<long long> store; while (true) { store.clear(); cin >> num_1 >> num_2; store.push_back(num_1); if (num_1 != 0 && num_2 != 0 && num_2 != 1) { while (num_1 > 1) { store.push_back(num_1 / num_2); if (num_1 % num_2 != 0) { cout << "Boring!"; store.clear(); break; } num_1 = num_1 / num_2; } for (int i = 0; i < store.size(); i++) { cout << store[i]; if (i != store.size() - 1) { cout << " "; } } printf("\n"); } else { cout << "Boring!\n"; store.clear(); } } return 0; } ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up