Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int a[100000];
- int main() {
- int n;
- cin >> n;
- int cnt = 0;
- do {
- ++cnt;
- a[cnt] = (n % 2) * 5;
- n = n / 2;
- } while (n > 1);
- a[++cnt] = n * 5;
- for (int i = cnt; i > 0; i--) {
- cout << a[i];
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement