#6330. [SCCPC 2021] Chuanpai
[SCCPC 2021] Chuanpai
[SCCPC 2021] Chuanpai
题目描述
$\textit{Chuanpai}$(川牌) is a kind of traditional playing cards in Sichuan. Each card is marked with two integers $x$ and $y$ where $1 \le x \le y \le 6$.:::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 $T$ ($1 \le T \le 100$) 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 $x + y = k$.4
4
5
8
100
2
2
3
0
提示
We use $(a, b)$ to indicate a type of card whose $x = a$ and $y = b$.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 . 标签: P14117|模拟|四川|2021|枚举|省赛/邀请赛