CodeChef::FCTRL2(incomplete)
#include <iostream>
using namespace std ;
int main(){
long long int t ;
cin >> t ;
long long int n[t];
long long int fact{1};
for (long long int i = 0; i < t; ++i) {
cin >> n[i];
}
for (long long int i = 0; i < t; ++i) {
for (long long int j = 1; j <= n[i]; ++j) {
fact = fact*j ;
}
cout << fact << '\n';
fact = 1 ;
}
return 0 ;
}
Comments
Post a Comment