#include using namespace std; #define ALL(x) x.begin(),x.end() #define rep(i,n) for(int i=0;ibool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b c; ll solve(ll k){ ll ret=0; rep(i,n){ for(int bit=0;bit<(1<>i)&1){ //lcm計算 ll l=c[i]; rep(j,n)if(i!=j)if((bit>>j)&1){ l=l/gcd(l,c[j])*c[j]; if(l>INF){ l=LINF; break; } } ret+=(__builtin_parity(bit)?(k/l):-(k/l)); } } return ret; } signed main(){ cin.tie(0); ios::sync_with_stdio(0); ll l,h;cin>>n>>l>>h; c.resize(n); rep(i,n)cin>>c[i]; cout<