| 比赛 | 普及组2016模拟练习3 | 评测结果 | AAAAAAAAAAA |
|---|---|---|---|
| 题目名称 | 焰火表演 | 最终得分 | 100 |
| 用户昵称 | 不会起名怪我咯 | 运行时间 | 0.220 s |
| 代码语言 | C++ | 内存使用 | 7.94 MiB |
| 提交时间 | 2016-11-15 20:31:13 | ||
#include <iostream>
#include <cstdio>
using namespace std;
int hh[2000001]={0};
int main(){
freopen("fireshow.in","r",stdin);
freopen("fireshow.out","w",stdout);
int t,n,c,max=0;
cin>>c>>n;
for(int i=1;i<=c;i++){
cin>>t;
for(int j=1;t*j<=n;j++){
hh[t*j]=1;
}
}
for(int k=1;k<=n;k++){
if(hh[k]==1){
max++;
}
}
cout<<max;
return 0;
}