提交时间:2023-11-04 09:06:57
运行 ID: 108609
#include<bits/stdc++.h> using namespace std; int main() { int n,a[10],i,m=0; cin>>n; for(i=1;i<=n;i++) { a[i]=i; } do { for(i=1;i<=n;i++) { cout<<a[i]; } cout<<endl; m++; } while(next_permutation(a+1,a+n+1)); cout<<m; return 0; }