当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

3463:Goldbach Division

题目描述
Everybody knows Goldbach Conjecture! Here is one edition of it:

1) Every odd integer greater than 17 can be written as three different odd primes’ sum;
2) Every even integer greater than 6 can be written as two different odd primes’ sum.

Loving the magical math conjecture very much, iSea try to have a closer look on it. Now he has a new definition: Goldbach Division. If we express an even integer as two different odd primes’ sum, or odd integer as three different odd primes’ sum, we call it a form of Goldbach Division of N, using a symbol G(N).

For example, if N = 18, there are two ways to divide N.
18 = 5 + 13 = 7 + 11
If N = 19, there is only one way to divide N.
19 = 3 + 5 + 11

Here comes your task, give a integer N, find |G(N)|, the number of different G(N).
输入解释
There are several test cases in the input.

Each test case includes one integer N (1 <= N <= 20000).

The input terminates by end of file marker.
输出解释
For each test case, output one integer, indicating |G(N)|.
输入样例
18
19
输出样例
2
1
提示
There may be 2000 cases, be careful.
来自杭电HDUOJ的附加信息
Author iSea @ WHU
Recommend zhouzeyong

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-3463

最后修改于 2020-10-25T23:03:49+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 131072/65536K(Java/Others)