#include< iostream > using namespace std; long long int fact(int n) { if(n <= 1) return 1; return n * fact(n-1); } int main() { int n, t; cin >> n; while(n--) { cin >> t; cout << fact(t) << endl; } return 0; }
Post a Comment
No comments:
Post a Comment