-
Notifications
You must be signed in to change notification settings - Fork 14
/
10323.cpp
48 lines (47 loc) · 1.5 KB
/
10323.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include<iostream>
using namespace std;
int main(){
long long n;
while(cin>>n){
if(n<0){
if(n%2==0)
cout<<"Underflow!"<<endl;
else
cout<<"Overflow!"<<endl;
continue;
}
if(n<8 && n>=0){
cout<<"Underflow!"<<endl;
continue;
}
if(n>13){
cout<<"Overflow!"<<endl;
continue;
}
if(n==8){
cout<<"40320"<<endl;
continue;
}
if(n==9){
cout<<"362880"<<endl;
continue;
}
if(n==10){
cout<<"3628800"<<endl;
continue;
}
if(n==11){
cout<<"39916800"<<endl;
continue;
}
if(n==12){
cout<<"479001600"<<endl;
continue;
}
if(n==13){
cout<<"6227020800"<<endl;
continue;
}
}
return 0;
}