"Cool Guys" CodeChef challenge
Both _tmain() and _TCHAR are Microsoft-specific and are non-portable. Just make them main() and char respectively.

The name T is commonly used in template statements.  Even with the given explanation, it may still confuse others, especially if you end up adding templates somewhere.  You could just rename this to testCases or something similar.

It's good to have more whitespace between operands for readability.
For instance, this:

for(int k=0;k&lt;T;k++)


can look like this:
  for (int k = 0; k &lt; T; k++)


You have some not-so-useful comments:

//  Take the test cases as input


This is already obvious based on what it's doing.

// the main loop that runs T times


This is also already obvious, based on the loop statement.

int result=2*N-1;   //  the numerator of the result

int square=N*N;   //  the denominator of the result


Although not necessarily useless comments, they are an indication that those variables can be given more accurate names.  It'll also help give more meaning to the very last cout statement that uses those variables.