Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
106973 | 令狐文丽 | 哪几扇门是打开的 | C++ | Wrong Answer | 1 MS | 260 KB | 269 | 2025-01-17 10:26:08 |
#include<iostream> using namespace std; int main(){ int n,a[100]={0}; for(int j=2;j<=100;j++){ for(int i=1;i<=100;i++){ if(i%j==0){ a[i]=!a[i]; } } } for(int i=1;i<=100;i++){ if(a[i]==0){ cout<<i<<" "; } } return 0; }
------Input------
0
------Answer-----
1 4 9 16 25 36 49 64 81 100
------Your output-----
1 4 9 16 25 36 49 64 81