{"problem":{"name":"Semi Common Multiple","description":{"content":"Given are a sequence $A= {a_1,a_2,......a_N}$ of $N$ positive even numbers, and an integer $M$. Let a _semi-common multiple_ of $A$ be a positive integer $X$ that satisfies the following condition for","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc150_d"},"statements":[{"statement_type":"Markdown","content":"Given are a sequence $A= {a_1,a_2,......a_N}$ of $N$ positive even numbers, and an integer $M$.\nLet a _semi-common multiple_ of $A$ be a positive integer $X$ that satisfies the following condition for every $k$ $(1 \\leq k \\leq N)$:\n\n*   There exists a non-negative integer $p$ such that $X= a_k \\times (p+0.5)$.\n\nFind the number of semi-common multiples of $A$ among the integers between $1$ and $M$ (inclusive).\n\n## Constraints\n\n*   $1 \\leq N \\leq 10^5$\n*   $1 \\leq M \\leq 10^9$\n*   $2 \\leq a_i \\leq 10^9$\n*   $a_i$ is an even number.\n*   All values in input are integers.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$ $M$\n$a_1$ $a_2$ $...$ $a_N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc150_d","tags":[],"sample_group":[["2 50\n6 10","2\n\n*   $15 = 6 \\times 2.5$\n*   $15 = 10 \\times 1.5$\n*   $45 = 6 \\times 7.5$\n*   $45 = 10 \\times 4.5$\n\nThus, $15$ and $45$ are semi-common multiples of $A$. There are no other semi-common multiples of $A$ between $1$ and $50$, so the answer is $2$."],["3 100\n14 22 40","0\n\nThe answer can be $0$."],["5 1000000000\n6 6 2 6 2","166666667"]],"created_at":"2026-03-03 11:01:14"}}