Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class ReverseMagicalSource {
- public:
- int find(int source, int A) {
- int aux=source;int tot=10;
- while(aux<A){
- aux=aux+(aux*tot);tot=tot*10;
- }
- return aux;
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement