code chef, july long unaccepted. TLE. new logic? pattern, triangular numbers