Qapitol QA interview question

Find and return the longest repeating substring Convert the given numbers to rupees