fork(2) download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4. unsigned long long i,a,ile,w;
  5. int main()
  6. {
  7. cin >> ile;
  8. for(i=1;i<=ile;i++)
  9. {
  10. w=1;
  11. cin>>a;
  12. if(a==0)
  13. w=0;
  14. while(a>=1)
  15. {
  16. w=w*a;
  17. a--;
  18. }
  19.  
  20. cout<< w % 100 / 10 << ' ' << w % 10 << endl;
  21. }
  22. return 0;
  23. }
  24.  
Success #stdin #stdout 0s 4324KB
stdin
20
stdout
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0