#include<bits/stdc++.h>
using namespace std;
int main(){
	long long n;
	long long s=1;
	cin>>n;
	for(int i=1;i<=n;i++){
		s*=i;
	}
	cout<<s;
	return 0;
}

1 comments

  • @ 2025-3-10 10:33:44

    #include <bits/stdc++.h> using namespace std; long long n, f = 1;

    int main() { cin >> n; for (int i = 1; i <= n; i++) { f *= i; } cout << f;

    return 0;
    

    }

    • 1

    Information

    ID
    84
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    5
    Tags
    # Submissions
    298
    Accepted
    113
    Uploaded By