fork download
  1. #include <iostream>
  2. #include <iomanip>
  3. #include <string>
  4. using namespace std;
  5. int main()
  6. {
  7. int x,y;
  8. cin>>x;
  9. while(x>0){
  10. long long z=1;
  11. cin>>y;
  12. for (y; y>=1;y--){
  13. z*=y;
  14.  
  15. }
  16. cout<<z<<endl;
  17. x--;
  18.  
  19. }
  20.  
  21.  
  22. }
Success #stdin #stdout 0s 5264KB
stdin
5
stdout
0
1
1
1
1