tlle in flipcoins

I am getting tle in flipcoin…is there any faster way to perform these operations on the array other than the faster I/O methods??..

//