You are viewing a single comment's thread. Return to all comments →
C++
void decentNumber(int n) { for (auto i = 0; i <= n; ++i) { if (i % 5 == 0 && (n - i) % 3 == 0) { cout << string(n - i, '5') << string(i, '3') << endl; return; } } cout << -1 << endl; }
Seems like cookies are disabled on this browser, please enable them to open this website
Sherlock and The Beast
You are viewing a single comment's thread. Return to all comments →
C++