Calendar

AtCoder
IDs8pc_3_a
Time1000ms
Memory256MB
Difficulty
Snuke has a very long calendar. It has a grid with $n$ rows and $7$ columns. One day, he noticed that calendar has a following regularity. * The cell at the $i$-th row and $j$-th column contains the integer $7i+j-7$. A good sub-grid is a $3 \\times 3$ sub-grid and the sum of integers in this sub-grid mod $11$ is $k$. How many good sub-grid are there? Write a program and help him. ## Input The input is given from standard input in the following format. > $n \\quad k$ [samples]
API Response (JSON)
{
  "problem": {
    "name": "Calendar",
    "description": {
      "content": "Snuke has a very long calendar. It has a grid with $n$ rows and $7$ columns. One day, he noticed that calendar has a following regularity.   *   The cell at the $i$-th row and $j$-th column contains ",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "s8pc_3_a"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "Snuke has a very long calendar. It has a grid with $n$ rows and $7$ columns. One day, he noticed that calendar has a following regularity.  \n\n*   The cell at the $i$-th row and $j$-th column contains ...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments