2 1
4 Four quadruples below satisfy the conditions: * $(a,b,c,d)=(2,1,1,1)$ * $(a,b,c,d)=(1,2,1,1)$ * $(a,b,c,d)=(2,2,2,1)$ * $(a,b,c,d)=(2,2,1,2)$
2525 -425
10314607400
{
"problem": {
"name": "Quadruple",
"description": {
"content": "Given are integers $N$ and $K$. How many quadruples of integers $(a,b,c,d)$ satisfy both of the following conditions? * $1 \\leq a,b,c,d \\leq N$ * $a+b-c-d=K$",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "arc107_b"
},
"statements": [
{
"statement_type": "Markdown",
"content": "Given are integers $N$ and $K$. How many quadruples of integers $(a,b,c,d)$ satisfy both of the following conditions?\n\n* $1 \\leq a,b,c,d \\leq N$\n* $a+b-c-d=K$\n\n## Constraints\n\n* $1 \\leq N \\leq 1...",
"is_translate": false,
"language": "English"
}
]
}