PersonalCorpus 版 (精华区)
// A stupid problem
1243633 Big Guava ... 10323 Accepted
0:00.070 64 2002/11/17 06:23:02.314
void main()
{
#ifndef ONLINE_JUDGE
freopen("k:\\uva\\i10323","r",stdin);
freopen("k:\\uva\\o10323","w",stdout);
#endif
int i,n;
double r;
while (scanf("%d",&n)==1) {
if (n<0) {
if (-n%2==1) printf("Overflow!\n");
else printf("Underflow!\n");
} else if (n<8) printf("Underflow!\n");
else if (n>13) printf("Overflow!\n");
else {
r=40320;
for (i=9;i<=n;i++) r*=i;
printf("%.0lf\n",r);
}
}
}
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:2.075毫秒