logo AlgoBeat OnlineJudge
登录 注册

#214242. [SCCPC 2021] Chuanpai

内存限制:256 MiB 时间限制:1000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

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

:::align{center} 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 , and , 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

样例输出 1

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 .