Migrated from Lutece 923 稳住GCD
All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.
Description
给你一组数,a1,a2,a3,⋯,an。
令:
G=gcd(a1,a2,a3,⋯,an)
现在从中任意删除一些数字,设剩下的数为:al1,al2,al3,⋯,alm。
再令:
g=gcd(al1,al2,al3,⋯,alm)
现要求G=g,问最多能删除多少数?
第一行一个数n,第二行n个数a1,a2,a3,⋯,an。
1≤n≤700
1≤ai≤10000
Output
输出只有一个数,表示最多能删除多少数。
Samples
3
4 6 8
1
Resources
2014 UESTC ACM Training for Math