問題一覧 > 通常問題

No.2682 Visible Divisible

レベル : / AI推定難易度 : 1000 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 119
作問者 : だれ / テスター : 👑 tute7627 SPD_9X2 👑 rin204 kyawa Ayuna
お気に入りにしたユーザー ProblemId : 10418 / 自分の提出
問題文最終更新日: 2024-03-15 17:34:48
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 422 (第1回 競技プログラミング講習会作問企画コンテスト) (順位表) の他の問題:

Problem Statement

There is a very large number $X$. You want to know whether $X$ is a multiple of $K$.

Because $X$ is far too huge, you cannot directly divide $X$ by $K$. Instead, through your psychic powers, you have found out that $X$ is a multiple of $A_1, \ldots, A_N$.

Determine whether this information establishes for certain that $X$ is a multiple of $K$.

Constraints

  • All input values are integers.
  • $1\leq N\leq 2\times 10^5$
  • $1\leq K\leq 10^{18}$
  • $1\leq A_i\leq 10^{18}$

Input

$N$ $K$
$A_1$ $A_2$ $\ldots$ $A_N$

Output

Print Yes if it is certain that $X$ is a multiple of $K$, and No otherwise.

Sample

Sample 1
Input
3 12
3 4 10
Output
Yes

Since $X$ is a multiple of both $3$ and $4$, it follows that it is a multiple of $12$.

Sample 2
Input
2 8
2 4
Output
No

For example, when $X=4$, $X$ is not a multiple of $8$.

Sample 3
Input
25 101
2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97
Output
No

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。