Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
102793 | 吴诗涵 | 哪几扇门是打开的 | C++ | Wrong Answer | 0 MS | 260 KB | 526 | 2024-12-22 19:31:05 |
#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(a[i]%n==0){ a[i]=0; } } } for(int i=1;i<=100;i++){ if(a[i]==1){ cout<<a[i]; } } return 0; }
------Input------
0
------Answer-----
1 4 9 16 25 36 49 64 81 100
------Your output-----
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111