Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
102791 | 刘珩宇 | 哪几扇门是打开的 | C++ | Runtime Error | 3 MS | 260 KB | 615 | 2024-12-22 19:27:59 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int i,n[100],j; for(i=0;i<100;i++){ n[i]=1; } for(i=2;i<=100;i++){ for(j=1;j<=100;j++){ if(j%i==0){ if(n[j]==1){ n[i]==0; } else{ n[i]==1; } } } } for(i=1;i<=100;i++){ if(n[i]==1){ cout<<i<<endl; } } return 0; }
Runtime Error:Segmentation fault