import javautilScanner;
public class nc {
public static void main(String[] args) throws Exception {
// TODO Autogenerated method stub
int[] date = new int[];
date[] = ;
int weishu = ; // 求出来的值的位数
Systemoutprintln(用数组解决大数问题);
Systemoutprintln(求n!的值);
Systemoutprint(n=);
Scanner cin = new Scanner(Systemin);
int n = cinnextInt();
for (int i = ; i <= n; i++) {
for (int j = ; j <= weishu; j++) {
date[j] = date[j] * i;
}
// 确保除最高位外的每位不大于
for (int j = ; j < weishu; j++) {
if (date[j] >= ) {
date[j + ] += date[j] / ;
date[j] = date[j] % ;
}
}
//确保最高位不大于
while (date[weishu] >= ) {
weishu++;
date[weishu] += date[weishu ] / ;
date[weishu ] = date[weishu ] % ;
}
}
Systemoutprint(n + != );
for (int k = weishu; k >= ; k) {
Systemoutprint(date[k]);
}
Systemoutprintln();
}
}