A2. Product of Triples (Hard Version)

Codeforces
IDCF10264A2
Time2000ms
Memory256MB
Difficulty
English · Original
Formal · Original
Many great mathematicians have sequences named after them. Timmy is a great mathematician, so he created a sequence called $t$, but he needs help to compute its values. Let $t_i$ be the number of unordered triples $(a, b, c)$ where $a <= b <= c$ and $a dot.op b dot.op c = i$. For all $i$ from $1$ to $n$, find and print $t_i$. The only line contains a single integer $n$ $(1 <= n <= 10^4)$. For all $i$ from $1$ to $n$, print $t_i$. There are $3$ triples that have product $8$: $(1, 1, 8)$, $(1, 2, 4)$, and $(2, 2, 2)$. However, there is only $1$ triple that has product $7$: $(1, 1, 7)$. ## Input The only line contains a single integer $n$ $(1 <= n <= 10^4)$. ## Output For all $i$ from $1$ to $n$, print $t_i$. [samples] ## Note There are $3$ triples that have product $8$: $(1, 1, 8)$, $(1, 2, 4)$, and $(2, 2, 2)$. However, there is only $1$ triple that has product $7$: $(1, 1, 7)$.
**Definitions** Let $ n \in \mathbb{Z}^+ $ with $ 1 \leq n \leq 10^4 $. For each $ i \in \{1, 2, \dots, n\} $, define $ t_i $ as the number of unordered triples $ (a, b, c) \in \mathbb{Z}^+^3 $ such that $ a \leq b \leq c $ and $ a \cdot b \cdot c = i $. **Objective** For each $ i = 1 $ to $ n $, compute and output $ t_i $.
API Response (JSON)
{
  "problem": {
    "name": "A2. Product of Triples (Hard Version)",
    "description": {
      "content": "Many great mathematicians have sequences named after them. Timmy is a great mathematician, so he created a sequence called $t$, but he needs help to compute its values. Let $t_i$ be the number of unor",
      "description_type": "Markdown"
    },
    "platform": "Codeforces",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "CF10264A2"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "Many great mathematicians have sequences named after them. Timmy is a great mathematician, so he created a sequence called $t$, but he needs help to compute its values. Let $t_i$ be the number of unor...",
      "is_translate": false,
      "language": "English"
    },
    {
      "statement_type": "Markdown",
      "content": "**Definitions**  \nLet $ n \\in \\mathbb{Z}^+ $ with $ 1 \\leq n \\leq 10^4 $.  \nFor each $ i \\in \\{1, 2, \\dots, n\\} $, define $ t_i $ as the number of unordered triples $ (a, b, c) \\in \\mathbb{Z}^+^3 $ su...",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments