提交时间:2023-08-09 17:37:35

运行 ID: 81644

#include<bits/stdc++.h> using namespace std; unsigned long long t,n; int main(){ cin>>t>>n; if(t==1){ cout<<n*(n-1)/2; } else if(t==2){ cout<<((n*(n-1))/2*(n-2))/3*(n-3)/4; } else{ cout<<pow(2,n-1); } return 0; }