1 solutions

  • 0
    @ 2025-4-19 16:26:36
    #include<bits/stdc++.h>
    using namespace std;
    const int nm=114514;
    int c[nm];
    int main()
    {
    
    	int n;
    	cin>>n;
    	c[0]=1;
    	while(n--){
    		int t=0;
    		for(int i=0;i<nm;i++){
    			c[i]=c[i]*(n+1)+t;
    			t=c[i]/10;
    			c[i]%=10;
    		}
    	}
    	int lc=nm-1;
    	while(lc>0&&c[lc]==0) lc--;
    	for(int i=lc;i>=0;i--) cout<<c[i];
        return 0;
    }
    

    Information

    ID
    959
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    5
    Tags
    (None)
    # Submissions
    33
    Accepted
    5
    Uploaded By