| Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 70064 | sh25_wangtaojie | 全排列 | C++ | 通过 | 0 MS | 252 KB | 433 | 2025-10-17 14:21:19 |
#include <iostream> #include <algorithm> using namespace std; int main() { int n; cin >> n; int nums[9] = {1,2,3,4,5,6,7,8,9}; do { for(int i=0; i<n; i++) { cout << nums[i]; } cout << endl; } while(next_permutation(nums, nums+n)); int count = 1; for(int i=1; i<=n; i++) count *= i; cout << count << endl; return 0; }