题目描述
Bash 已经踏上了成为最伟大的口袋妖怪大师的旅程。为了得到他的第一个口袋妖怪,他去了 Zulu 教授的实验室。由于 Bash 是 Zulu 教授最喜欢的学生,Zulu 允许他从实验室里取出任意数量的口袋妖怪。
但是 Zulu 警告他,每个小精灵都有一个力量值,例如 $k(k>1)$ 个小精灵在一起,它们的力量值为 $s_1,s_2,\dots,s_k$,如果 $\gcd(s_1,s_2,\dots s_k)=1$(见 $\gcd$ 的定义注释),它们之间就会互相打架。
Bash 作为一个聪明的人,不希望他的口袋妖怪互相斗争。然而,他也想最大化他从实验室里带走的神奇宝贝的数量。你能帮 Bash 找出他能带走的最大数量的口袋妖怪吗?
**注意:口袋妖怪不能与自己战斗。**
提示
$ gcd $ (greatest common divisor) of positive integers set $ {a_{1},a_{2},...,a_{n}} $ is the maximum positive integer that divides all the integers $ {a_{1},a_{2},...,a_{n}} $ .
In the first sample, we can take Pokemons with strengths $ {2,4} $ since $ gcd(2,4)=2 $ .
In the second sample, we can take Pokemons with strengths $ {2,4,6} $ , and there is no larger group with $ gcd≠1 $ .