fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. int ile;
  4. long x;
  5. long silnia(int n)
  6. {
  7. if (n==0) return 1;
  8. else return n*silnia(n-1);
  9. }
  10.  
  11. int main()
  12. {
  13. cin>>ile;
  14.  
  15. for(int i=1; i<=ile; i++)
  16. {
  17. int a;
  18. cin>>a;
  19. x=silnia(a);
  20. cout<<x/10%10<<" "<<x%10<<endl;
  21. }
  22.  
  23. return 0;
  24. }
Success #stdin #stdout 2.35s 15232KB
stdin
3
1000000000
1000000000
1000000000
stdout
0 0
0 0
0 0