1 条题解
-
1
#include <bits/stdc++.h> using namespace std;
int main() { int a[6] = {0, 1, 2, 3, 4, 5}; cout << "1: " ; for (int i = 1; i <= 5; i++) { cout << a[i] << " "; } cout<<endl;
for (int i = 2; i <= 10; i++) { int d = a[1]; for (int j = 1; j < 5; j++) { a[j] = a[j + 1]; } a[5] = d; cout << i << ": "; for (int j = 1; j <= 5; j++) { cout << a[j] << " "; } cout << endl; } return 0;}
- 1
信息
- ID
- 344
- 时间
- 1000ms
- 内存
- 64MiB
- 难度
- 4
- 标签
- 递交数
- 91
- 已通过
- 45
- 上传者