<div>I m using Python 2.7</div><div>Steven wrote:</div><div>"
<span style>Scale your numbers from time to time, to avoid them getting too big</span> "</div><div>What does this mean?</div><div><br></div><div><div>inp refers to the sample input test case I have given at first.Its a string containing two numbers,</div>
<div>The program has to handle large numbers till 10**18 and also has to execute considerably fast (within 16 CPU time).</div><div><br></div><div>Using xrange() causes the OveflowError,Whereas using range() causes too many items</div>
<div>Is writing my own generator only solution? Or is there another way in which i can generate big numbers and in considerably fast manner?</div></div>