提交时间:2024-08-20 20:21:22
运行 ID: 169929
#include<bits/stdc++.h> using namespace std; const int N = 1005; const int INF = 0x3f3f3f3f; #define int long long #define quick_cin_cout ios::sync_with_stdio(false);cin.tie(0);cout.tie(0); #define endl '\n' #define I return #define AK 0 #define IOI ; signed main(){ quick_cin_cout; int n; cin >> n; int num[100000]; num[0] = num[1] = 1; for(int i = 2;i <= n;i++){ int tmp = 0; for(int j = 1; j <= num[0]; j++){ num[j] = num[j] * i + tmp; tmp = num[j] / 10; num[j] = num[j] % 10; } while(tmp){ num[0]++; num[num[0]] = tmp % 10; tmp = tmp / 10; } } cout << n << "!="; for(int i = num[0]; i >= 1; i--){ cout << num[i]; } I AK IOI } /*Note:*********************** *****************************/ //coder:Mino_XIE1212