Chuanpai
题号:NC222748
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

is a kind of traditional playing cards in Sichuan. Each card is marked with two integers and where .


Some samples of Chuanpai.
The first one is marked with and , while the second one is marked with and .

Given an integer , please count the number of different types of cards satisfying .
We say two cards with integers x_1, y_1 and x_2, y_2 are of different types if or .

输入描述:

There are multiple test cases. The first line of the input contains an integer  () indicating the number of test cases. For each test case:
The first and only line contains an integer ().

输出描述:

For each test case output one line containing one integer, indicating the number of types of cards satisfying .
示例1

输入

复制
4
4
5
8
100

输出

复制
2
2
3
0

备注:

We use  to indicate a type of card whose  and .
For the first sample test case the valid types of cards are and .
For the second sample test case the valid types of cards are and .
For the third sample test case the valid types of cards are , and .