美妙的函数
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
题目描述
定义美妙的函数
$$\begin{array}{} F(x)= \left\{\begin{matrix} 0,{x\leq2}\\ 1,x> 2\text{且}x\text{为质数} \\ \sqrt{x},x> 2\text{且} x\text{为完全平方数} \\0,\text{otherwise} \end{matrix}\right. \end{array} $$定义序列 的价值为所有 的和,也就是 。
请输出所有和为 的正整数序列 的最大价值。
输入格式
第一行一个正整数 ,表示数据组数。
接下来 行,每行一个正整数 。
输出格式
接下来 行,输出该组数据的答案。
样例 #1
样例输入 #1
2
1
6
样例输出 #1
0
2
提示
样例解释
- 第一组询问 ,只有一种方案为 。
- 第二组询问 ,一种方案为 。
对于 的数据,。
对于 的数据,。
对于 的数据,。
对于 的数据,。
对于 的数据,。
北辰OI俱乐部|北辰杯·6月公开赛
- Status
- Done
- Rule
- OI
- Problem
- 8
- Start at
- 2024-6-7 18:00
- End at
- 2024-6-8 18:00
- Duration
- 4 hour(s)
- Host
- Partic.
- 168