{"raw_statement":[{"iden":"problem statement","content":"There are $N$ boxes arranged in a row from left to right. The $i$\\-th box from the left contains $A_i$ candies.\nYou will take out the candies from some consecutive boxes and distribute them evenly to $M$ children.\nSuch being the case, find the number of the pairs $(l, r)$ that satisfy the following:\n\n*   $l$ and $r$ are both integers and satisfy $1 \\leq l \\leq r \\leq N$.\n*   $A_l + A_{l+1} + ... + A_r$ is a multiple of $M$."},{"iden":"constraints","content":"*   All values in input are integers.\n*   $1 \\leq N \\leq 10^5$\n*   $2 \\leq M \\leq 10^9$\n*   $1 \\leq A_i \\leq 10^9$"},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$ $M$\n$A_1$ $A_2$ $...$ $A_N$"},{"iden":"sample input 1","content":"3 2\n4 1 5"},{"iden":"sample output 1","content":"3\n\nThe sum $A_l + A_{l+1} + ... + A_r$ for each pair $(l, r)$ is as follows:\n\n*   Sum for $(1, 1)$: $4$\n*   Sum for $(1, 2)$: $5$\n*   Sum for $(1, 3)$: $10$\n*   Sum for $(2, 2)$: $1$\n*   Sum for $(2, 3)$: $6$\n*   Sum for $(3, 3)$: $5$\n\nAmong these, three are multiples of $2$."},{"iden":"sample input 2","content":"13 17\n29 7 5 7 9 51 7 13 8 55 42 9 81"},{"iden":"sample output 2","content":"6"},{"iden":"sample input 3","content":"10 400000000\n1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000"},{"iden":"sample output 3","content":"25"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}