{"problem":{"name":"Triangular Relationship","description":{"content":"You are given integers $N$ and $K$. Find the number of triples $(a,b,c)$ of positive integers not greater than $N$ such that $a+b,b+c$ and $c+a$ are all multiples of $K$. The order of $a,b,c$ does mat","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"arc102_a"},"statements":[{"statement_type":"Markdown","content":"You are given integers $N$ and $K$. Find the number of triples $(a,b,c)$ of positive integers not greater than $N$ such that $a+b,b+c$ and $c+a$ are all multiples of $K$. The order of $a,b,c$ does matter, and some of them can be the same.\n\n## Constraints\n\n*   $1 \\leq N,K \\leq 2\\times 10^5$\n*   $N$ and $K$ are integers.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$ $K$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"arc102_a","tags":[],"sample_group":[["3 2","9\n\n$(1,1,1),(1,1,3),(1,3,1),(1,3,3),(2,2,2),(3,1,1),(3,1,3),(3,3,1)$ and $(3,3,3)$ satisfy the condition."],["5 3","1"],["31415 9265","27"],["35897 932","114191"]],"created_at":"2026-03-03 11:01:13"}}