問題一覧 > 通常問題

No.2510 Six Cube Sum Counting

レベル : / AI推定難易度 : 1500 / 実行時間制限 : 1ケース 4.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 76
作問者 : 👑 KA37RI / テスター : Mizar 👑 seekworser 👑 amentorimaru
お気に入りにしたユーザー ProblemId : 10030 / 自分の提出
問題文最終更新日: 2023-11-23 15:28:24
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 409 (順位表) の他の問題:

Problem Statement

You are given a non-negative integer $X$. Output the number of tuples of non-negative integers $(a,\ b,\ c,\ d,\ e,\ f)$ that satisfy all of the following conditions.

  • $0 \le a \le b \le c \le d \le e \le f \le 300$
  • $a^3 + b^3 + c^3 + d^3 + e^3 + f^3= X$

Input

$X
$

Constraints

  • $0 \le X \le 10^9$
  • $X$ is an integer.

Output

Output the number of tuples of non-negative integers $(a,\ b,\ c,\ d,\ e,\ f)$.

Sample

Sample 1
Input
444
Output
1

Since $1^3+1^3+2^3+3^3+4^3+7^3 = 1+1+8+27+64+343 = 444$, the tuple $(a,\ b,\ c,\ d,\ e,\ f) = (1, 1, 2, 3, 4, 7)$ satisfies the conditions.

This is the only tuple of non-negative integers that satisfies the conditions. Note that $a \le b \le c \le d \le e \le f$ must hold.

Sample 2
Input
986
Output
2

The tuples of non-negative integers that satisfy the conditions are $(0, 2, 5, 5, 6, 8)$ and $(1, 4, 4, 4, 4, 9)$.

Sample 3
Input
51298165
Output
29423

Sample 4
Input
8042
Output
0

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。