fork download
  1. #include<iostream>
  2. using namespace std;
  3. long long fact(int n)
  4. {
  5. if(n==1)
  6. return 1;
  7. return n*fact(n-1);
  8. }
  9. int main()
  10. {
  11. int Testnum, N, M;
  12. cin>>Testnum;
  13. for(int i=0; i<Testnum; i++)
  14. {
  15. cin>>N>>M;
  16. //cout<<fact(M)/(fact(N)*fact(M-N))<<endl;
  17. cout<<fact(M)<<"₩n"<<fact(N)<<endl;
  18. }
  19. return 0;
  20. }
Success #stdin #stdout 0s 4988KB
stdin
3
2 2
1 5
13 29
stdout
2₩n2
120₩n1
-7055958792655077376₩n6227020800