ACM UVA-10323

題目

int main(int argc, char const* argv[])
{
    unsigned long long factorial[14];
    factorial[0] = 1;
    for(int i = 1;i <= 13;i++)
        factorial[i] = i*factorial[i-1];
    int n;
    while(~scanf("%d",&n)){
        if(n >= 0){
            if(n  >= 8 && n <= 13){
                printf("%llu\n",factorial[n]);
            }else if(n <= 7){
                printf("Underflow!\n");
            }else{
                printf("Overflow!\n");
            }
        }else{
            n = -n;
            if(n%2 == 0)
                printf("Underflow!\n");
            else
                printf("Overflow!\n");
        }
    }
    return 0;
}