Timer is Running

Given a positive integer N denoting the length of a stick, return the number of ways to split a stick into four parts so that it's possible to form a rectangle using these parts, but is impossible to form a square.

**Input:**

The first line contains T denoting the number of testcases. Then follows description of testcases. Each case contains a single positive integer N denoting the length of a stick.

**Output:**

For each test case, output a single line containing the number of ways to form rectangle by splitting given stick.

**Constraints:**

1 <= T <= 100

1 <= N <= 10^{9}

**Example:**

**Input :**

2

10

20

**Output :**

2

4

**Explanation:**

In the first example, the 2 ways to split the stick are {1,1,4,4} , {2,2,3,3} .

In the second example, the 4 ways to split the stick are {1,1,9,9} , {2,2,8,8} , {3,3,7,7} and {4,4,6,6}.

Note that {5,5,5,5} forms square so it is not considered.

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.

saiujwal13083 | 269 |

ppsvikhyat17 | 268 |

reclone_rk | 220 |

vt9941 | 216 |

bikramjs97 | 212 |

saiujwal13083 | 528 |

ppsvikhyat17 | 456 |

generic_coder | 424 |

vt9941 | 340 |

SourabhPatel | 328 |

blackshadows | 5448 |

Ibrahim Nash | 5438 |

akhayrutdinov | 5111 |

mb1973 | 4976 |

Quandray | 4752 |

Login to report an issue on this page.