/* MIDI Olympiad in Informatics 2007 * Reflections reference solution * by Daumilas Ardickas */ #include #include using namespace std; int oiler (int x){ int d=2, o=1; while (d*d<=x){ if (!(x%d)){ x/=d; o*=(d-1); while (!(x%d)){ o*=d; x/=d; } } ++d; } if (x>1) o*=(x-1); return o; } int main(){ freopen("reflections.in", "r", stdin); freopen("reflections.out", "w", stdout); int a, b, i; while (scanf("%i%i", &a, &b)==2){ long long x=0; for (i=a+1; i<=b+1; ++i) x+=(long long)oiler(i); cout << x << endl; //printf ("%f\n", (double)clock()/CLOCKS_PER_SEC); } }