8 条题解
-
1
#include <iostream> using namespace std; int main() { int arr[5] = {1, 2, 3, 4, 5}; for (int i = 1; i <= 10; i++) { cout << i << ": "; for (int j = 0; j < 5; j++) { cout << arr[j] << " "; } cout << endl; int temp = arr[0]; for (int k = 0; k < 4; k++) { arr[k] = arr[k + 1]; } arr[4] = temp; } return 0; }
信息
- ID
- 230
- 时间
- 1000ms
- 内存
- 64MiB
- 难度
- 8
- 标签
- 递交数
- 42
- 已通过
- 8
- 上传者