KEYENCE building

AtCoder
IDabc227_b
Time2000ms
Memory256MB
Difficulty
There are $N$ people numbered $1$ to $N$. Person $i$ guessed the building area of KEYENCE headquarters building to be $S_i$ square meters. The shape of KEYENCE headquarters building is shown below, where $a$ and $b$ are some **positive integers**. That is, the building area of the building can be represented as $4ab+3a+3b$. Based on just this information, how many of the $N$ people are guaranteed to be wrong in their guesses? ![image](https://img.atcoder.jp/ghi/5a025c1ae6042fc146b4404219ffc176.png) ## Constraints * $1 \leq N \leq 20$ * $1 \leq S_i \leq 1000$ * All values in input are integers. ## Input Input is given from Standard Input in the following format: $N$ $S_1$ $\ldots$ $S_N$ [samples]
Samples
Input #1
3
10 20 39
Output #1
1

The area would be $10$ square meters if $a=1,b=1$, and $39$ square meters if $a=2,b=3$.
However, no pair of positive integers $a$ and $b$ would make the area $20$ square meters.
Thus, we can only be sure that Person $2$ guessed wrong.
Input #2
5
666 777 888 777 666
Output #2
3
API Response (JSON)
{
  "problem": {
    "name": "KEYENCE building",
    "description": {
      "content": "There are $N$ people numbered $1$ to $N$. Person $i$ guessed the building area of KEYENCE headquarters building to be $S_i$ square meters. The shape of KEYENCE headquarters building is shown below, wh",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc227_b"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "There are $N$ people numbered $1$ to $N$.\nPerson $i$ guessed the building area of KEYENCE headquarters building to be $S_i$ square meters.\nThe shape of KEYENCE headquarters building is shown below, wh...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments