Around Square

AtCoder
IDabc077_b
Time2000ms
Memory256MB
Difficulty
Find the largest square number not exceeding $N$. Here, a _square number_ is an integer that can be represented as the square of an integer. ## Constraints * $1 \leq N \leq 10^9$ * $N$ is an integer. ## Input Input is given from Standard Input in the following format: $N$ [samples]
Samples
Input #1
10
Output #1
9

$10$ is not square, but $9 = 3 × 3$ is. Thus, we print $9$.
Input #2
81
Output #2
81
Input #3
271828182
Output #3
271821169
API Response (JSON)
{
  "problem": {
    "name": "Around Square",
    "description": {
      "content": "Find the largest square number not exceeding $N$. Here, a _square number_ is an integer that can be represented as the square of an integer.",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc077_b"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "Find the largest square number not exceeding $N$. Here, a _square number_ is an integer that can be represented as the square of an integer.\n\n## Constraints\n\n*   $1 \\leq N \\leq 10^9$\n*   $N$ is an int...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments