提交时间:2023-12-18 14:04:11
运行 ID: 116734
#include<bits/stdc++.h> using namespace std; int main() { int num[9]={1,2,3,4,5,6,7,8,9},n,sum=0; cin>>n; do{ for(int i=0;i<n;i++) cout<<num[i]; cout<<endl; sum++; }while(next_permutation(num,num+n)); cout<<sum; return 0; }