JAVA Vs C with same code

IN QSET (jan15 ) solution Accepted in java while show wrong answer in C… but java is little slower as I got TLE in one subtask so how to make it correct in C plz help