fixed typo

use for(;;) loop instead of while(true)
simplified 1000000 to 1e6