| 比赛 | 普及组2016模拟练习3 | 评测结果 | AEEAAAAAAAE |
|---|---|---|---|
| 题目名称 | 焰火表演 | 最终得分 | 72 |
| 用户昵称 | 1149182821 | 运行时间 | 0.241 s |
| 代码语言 | C++ | 内存使用 | 0.98 MiB |
| 提交时间 | 2016-11-15 20:02:21 | ||
#include<iostream>
#include<cstdio>
using namespace std;
int x[200003]={0};
int main(){ freopen("fireshow.in","r",stdin);
freopen("fireshow.out","w",stdout);
int sum=0;
int a,b,d,c;
int n[456];
cin>>a>>b;
for(d=1;d<=a;d++){
cin>>n[d];
}
for(d=1;d<=a;d++){
for(c=0;c<=b;){
x[c]=1;
c=c+n[d];
}
}
for(c=1;c<=b;c++){
if(x[c]==1)
sum++;
}
cout<<sum<<endl;
}