Pair

AtCoder
IDabc108_a
Time2000ms
Memory256MB
Difficulty
Find the number of ways to choose a pair of an even number and an odd number from the positive integers between $1$ and $K$ (inclusive). The order does not matter. ## Constraints * $2\leq K\leq 100$ * $K$ is an integer. ## Input Input is given from Standard Input in the following format: $K$ [samples]
Samples
Input #1
3
Output #1
2

Two pairs can be chosen: $(2,1)$ and $(2,3)$.
Input #2
6
Output #2
9
Input #3
11
Output #3
30
Input #4
50
Output #4
625
API Response (JSON)
{
  "problem": {
    "name": "Pair",
    "description": {
      "content": "Find the number of ways to choose a pair of an even number and an odd number from the positive integers between $1$ and $K$ (inclusive). The order does not matter.",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc108_a"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "Find the number of ways to choose a pair of an even number and an odd number from the positive integers between $1$ and $K$ (inclusive). The order does not matter.\n\n## Constraints\n\n*   $2\\leq K\\leq 10...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments