- 八
- 2017-01-28 19:36:40 @
#include <iostream>
#include <cstdlib>
#include <cstring>
#include <cstdio>
#include <cstring>
#include <vector>
#include <cmath>
#include <ctime>
#include <algorithm>
#include <iomanip>
using namespace std;
int main() {
//freopen("//xx.in","r",stdin);
//freopen("//xx.out","w",stdout);
int n,a[16],n1,n2,s=0;
bool b=true;
cin>>n;
for (int i=1;i<=n;i++) cin>>a[i];
cin>>n1>>n2;
for (int i=n1+1;i<=n2-1;i++)
{
if (i%8==0)
{
for (int j=1;j<=n;j++)
{
if (i%a[j]==0)
{
b=false;
break;
}
}
if (b==true) s++;
}
b=true;
}
cout<<s<<endl;
//fclose(stdin);
//fclose(stdout);
//while (1);
return 0;
}