Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
102799 吴诗涵 哪几扇门是打开的 C++ Accepted 1 MS 264 KB 523 2024-12-22 19:38:16

Tests(1/1):


Code:

#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 k,a[101]; for(int i=1;i<=100;i++){ a[i]=1; } for(int n=2;n<=100;n++){ for(int i=n;i<=100;i++){ if(i%n==0) a[i]=!a[i]; } } for(int i=1;i<=100;i++){ if(a[i]==1){ cout<<i<<endl; } } return 0; }