AtCoder Regular Contest 114
A
Not coprime
AtCoder
⌀ 750
原题
←B →
翻译中…

Problem Statement

翻译中…

Given are $N$ integers between $2$ and $50$ (inclusive): $X_1, X_2, \cdots, X_N$. Find the minimum positive integer $Y$ that satisfies the following for every $i = 1, 2, \cdots, N$:

翻译中…
  • $X_i$ and $Y$ are not coprime.
翻译中…

Constraints

翻译中…
  • $1 \leq N \leq 49$
  • $2 \leq X_i \leq 50$
  • $X_i \neq X_j (i \neq j)$
  • All values in input are integers.
翻译中…

Input

翻译中…

Input is given from Standard Input in the following format:

翻译中…

N
X_1 X_2 \ldots X_N

翻译中…

Output

翻译中…

Print the minimum positive integer that satisfies the condition.

翻译中…

样例

Input #1
2
4 3
Output #1
6
Being not coprime with $4$ requires being even, and being not coprime with $3$ requires being a multiple of $3$.
Input #2
1
47
Output #2
47
Input #3
7
3 4 6 7 8 9 10
Output #3
42
题目信息
题号
arc114_a
时间限制
2 s
内存限制
1024 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。