#include <stdio.h>

int main(){
    long int sum, min, max;

    printf("min max: ");
    scanf("%ld %ld", &min, &max);

    while(min < max){
        sum = 0;
        for(;min <= max; ++min)
            sum += (min*min);
        printf("Result: %ld\nmin max: ",sum);
        scanf("%ld %ld", &min, &max);
    }
    return 0;
}
