Problem code: PRIME1 (warning for fast IO is included)
Slow IO with boolean: https://www.codechef.com/viewsolution/19890625 (TLE)
Slow IO with int: https://www.codechef.com/viewsolution/19890658 (0.94s AC)
Fast IO with int: https://www.codechef.com/viewsolution/19892348 (0.93S AC)
Fast IO with boolean and no flushing: https://www.codechef.com/viewsolution/19892367 (TLE)
Fast IO with int and no flushing: https://www.codechef.com/viewsolution/19892381 (0.92s AC)
This means the program bottleneck must be in the boolean flag variable, but why?