You are viewing a single comment's thread. Return to all comments →
C++ solution :
void decentNumber(int n) { int tmp; for (int x=0;x<=n/5;x++) { if (!((n-x*5)%3)) { tmp=(n-x*5)/3; while(tmp--) cout << 555; while(x--) cout << 33333; cout << endl; return; } } cout << -1 << endl; return; }
Sherlock and The Beast
You are viewing a single comment's thread. Return to all comments →
C++ solution :