AABCC

AtCoder
IDabc300_d
Time3000ms
Memory256MB
Difficulty
How many positive integers no greater than $N$ can be represented as $a^2 \times b \times c^2$ with three **primes** $a,b$, and $c$ such that $a<b<c$? ## Constraints * $N$ is an integer satisfying $300 \le N \le 10^{12}$. ## Input The input is given from Standard Input in the following format: $N$ [samples]
Samples
Input #1
1000
Output #1
3

The conforming integers no greater than $1000$ are the following three.

*   $300 = 2^2 \times 3 \times 5^2$
*   $588 = 2^2 \times 3 \times 7^2$
*   $980 = 2^2 \times 5 \times 7^2$
Input #2
1000000000000
Output #2
2817785
API Response (JSON)
{
  "problem": {
    "name": "AABCC",
    "description": {
      "content": "How many positive integers no greater than $N$ can be represented as $a^2 \\times b \\times c^2$ with three **primes** $a,b$, and $c$ such that $a<b<c$?",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 3000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc300_d"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "How many positive integers no greater than $N$ can be represented as $a^2 \\times b \\times c^2$ with three **primes** $a,b$, and $c$ such that $a<b<c$?\n\n## Constraints\n\n*   $N$ is an integer satisfying...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments