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.

thanuvinu94 | 425 |

the_coder95 | 380 |

RishabhTanwar1 | 280 |

shubham3174 | 208 |

RitikRosan | 202 |

the_coder95 | 1226 |

RishabhTanwar1 | 1000 |

thanuvinu94 | 634 |

tathagat289 | 628 |

themanhasnoname | 620 |

blackshadows | 5331 |

Ibrahim Nash | 5219 |

akhayrutdinov | 5111 |

mb1973 | 4885 |

Quandray | 4547 |

Login to report an issue on this page.