| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 159745 | 张晓冉 | 最大公约数(函数) | C++ | Runtime Error | 0 MS | 268 KB | 461 | 2026-09-06 15:07:42 |
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; int a[101] = {0}; for(int i = 0;i < n;i++){ cin>>a[i]; } int x; cin>>x; int l = a[n - 1]; for(int i = n - 1;i >= x;i++){ a[i] = a[i - 1]; } a[x - 1] = l; for(int i = 0;i < n;i++){ if(i > 0){ cout<<" "; } cout<<a[i]; } cout<<endl; return 0; }
Runtime Error:Segmentation fault