fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int n;
  8. cin>>n;
  9. int num;
  10. for(int i=0 ; i<n ; i++){
  11. cin>>num;
  12. long long r=1;
  13. for(int j=1 ; j<=num ; j++)
  14. {
  15. r*=j ;
  16. }
  17. cout<<r<<endl;
  18. }
  19. }
Success #stdin #stdout 0.01s 5280KB
stdin
Standard input is empty
stdout
Standard output is empty