{"problem":{"name":"Coins","description":{"content":"You have $A$ $500$\\-yen coins, $B$ $100$\\-yen coins and $C$ $50$\\-yen coins (yen is the currency of Japan). In how many ways can we select some of these coins so that they are $X$ yen in total? Coins ","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc087_b"},"statements":[{"statement_type":"Markdown","content":"You have $A$ $500$\\-yen coins, $B$ $100$\\-yen coins and $C$ $50$\\-yen coins (yen is the currency of Japan). In how many ways can we select some of these coins so that they are $X$ yen in total?\nCoins of the same kind cannot be distinguished. Two ways to select coins are distinguished when, for some kind of coin, the numbers of that coin are different.\n\n## Constraints\n\n*   $0 \\leq A, B, C \\leq 50$\n*   $A + B + C \\geq 1$\n*   $50 \\leq X \\leq 20$ $000$\n*   $A$, $B$ and $C$ are integers.\n*   $X$ is a multiple of $50$.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$A$\n$B$\n$C$\n$X$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc087_b","tags":[],"sample_group":[["2\n2\n2\n100","2\n\nThere are two ways to satisfy the condition:\n\n*   Select zero $500$\\-yen coins, one $100$\\-yen coin and zero $50$\\-yen coins.\n*   Select zero $500$\\-yen coins, zero $100$\\-yen coins and two $50$\\-yen coins."],["5\n1\n0\n150","0\n\nNote that the total must be exactly $X$ yen."],["30\n40\n50\n6000","213"]],"created_at":"2026-03-03 11:01:13"}}