#include using namespace std; typedef long long ll; typedef long double ld; #define rep(i,n) for (int i = 0; i < (n); ++i) templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b> n >> l >> h; vector c(n); rep(i,n) cin >> c[i]; l--; ll ansl=0,ansh=0; for(int i=1;i<(1<h){ break; } } } if(lcm>h){ break; } if(cnt%2==0){ ansl-=l/lcm*cnt; ansh-=h/lcm*cnt; } else{ ansl+=l/lcm*cnt; ansh+=h/lcm*cnt; } } cout << ansh-ansl << endl; }