牛客网 计算机理念考研复试机试题 N的阶乘
求n的阶乘,n最大为1000,long long也存不下,考的是大整数的乘法和加法,即高精度。
#include <iostream>
#include <queue>
#include <stdlib.h>
#include <stdio.h>
#include <map>
#include <string>
#include <cstdlib>
#include <stack>
#include <vector>
#include <math.h>
#include <algorithm>
#include <typeinfo>
#include <cstring>
using namespace std;
typedef long long ll;
string sum(string a,string b){
if(a.length()<b.length()){
string tmp=a;
a=b;
b=tmp;
}
int len1=a.length()