| 记录编号 | 173628 | 评测结果 | AAAAAAAAAAA | ||
|---|---|---|---|---|---|
| 题目名称 | 162.[USACO Mar07] 焰火表演 | 最终得分 | 100 | ||
| 用户昵称 | 是否通过 | 通过 | |||
| 代码语言 | C++ | 运行时间 | 0.089 s | ||
| 提交时间 | 2015-07-29 15:05:22 | 内存使用 | 2.20 MiB | ||
#include<cstdio>
using namespace std;
bool f[2000001];
int main()
{
freopen("fireshow.in","r",stdin);
freopen("fireshow.out","w",stdout);
int n,c;
int Ans;
scanf("%d%d",&c,&n);
for(int i=1;i<=c;i++)
{
int x,y;
scanf("%d",&x);
y=x;
while(x<=n)
{
if(!f[x]) Ans++;
f[x]=1;
x+=y;
}
}
printf("%d",Ans);
return 0;
}