4 人解决,7 人已尝试。
5 份提交通过,共有 15 份提交。
7.9 EMB 奖励。
单点时限: 2.0 sec
内存限制: 256 MB
We say that a set X of natural numbers is n-k-special if:
for every x belonging to the set X: 1 <= x <= n,
the sum of all integers from X is greater than k,
X does not contain a pair of consecutive natural numbers.
Write a program that:
reads two natural numbers n and k,
computes the number of n-k-special sets,
writes the result.
In the first line there are two natural numbers n and k separated by a single space, 1 <= n <= 100, 0 <= k <= 400.
In the first line there should be written one non-negative integer, which equals the number of n-k-special sets for the given n and k.
5 6
3
4 人解决,7 人已尝试。
5 份提交通过,共有 15 份提交。
7.9 EMB 奖励。