The given problem is simple but even though couldn't solve it.Can someone help me with following problem...
'4' and '7' as Magic numbers. The numbers containing only magic numbers are also magical. Given a magic number N,what could be the next magical number greater than the given number.
problem link is:http:www.codechef.com/ALKH2012/problems/NMAGIC/