Given an integer **N**, find the number of ways we can choose **3** numbers from **{1,2,3…,N} **such that their sum is even.

**Input:**

The first line of the test case contains an integer T denoting number of test cases. Following T line contains an integer N each.

**Output:**

Print the answer under modulo 10^{9}+7.

**Constraints:**

1 <= T <= 100

3 <= N <= 10^{6}

**Example:-**

**Input:**

2

3

4

**Output:**

1

2

**Explanation:
Testcase 1:**For N=3 the only possible combination is {1,2,3}.So, the output is 1.

If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.

akhyasharma01 | 467 |

ASWATHAMA | 399 |

john_wick | 360 |

mmzeineddine | 295 |

PiyushPandey4 | 271 |

PiyushPandey4 | 614 |

ASWATHAMA | 561 |

akhyasharma01 | 547 |

john_wick | 521 |

rahulnishad96 | 442 |

blackshadows | 5362 |

Ibrahim Nash | 5242 |

akhayrutdinov | 5111 |

mb1973 | 4929 |

Quandray | 4598 |

Login to report an issue on this page.