| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 128181 | 王定阳 | 最简真分数 | C++ | Runtime Error | 102 MS | 276 KB | 382 | 2025-08-08 14:59:47 |
#include<iostream> using namespace std; int gy(int a,int s){ if(a>=s){ return 0; } for(int i=2;i<=a;i++){ if(a%i==0 && s%i==0){ return 0; } } return 1; } int main() { int z,x[100],c=0; cin>>z; for(int o=1;o<=z;o++){ cin>>x[o]; } for(int o=1;o<=z;o++){ for(int p=1;p<=z;p++){ if(gy(x[o],x[p])) { c++; } } } cout<<c; return 0; }
Runtime Error:Segmentation fault