Miracle_InDream @ 2023-08-06 15:28:48
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
int a[n]={0};
for(int i=1;i<=n;i++)
{
for(int j=1;j<=n;j++)
{
if(j%i==0)
{
if(a[j-1]=0)
a[j-1]=1;
else
a[j-1]=0;
}
}
}
for(int i=0;i<n;i++)
{
if(a[i]==1)
cout<<i+1<<' ';
}
return 0;
}
然鹅……
啥都没有
各路大佬救人啊!!!
by FurippuWRY @ 2023-08-06 15:35:19
@liyirong567 can can word
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin>>n;
for(int i=1;i*i<=n;i++) cout<<i*i<<" ";
return 0;
}
by Miracle_InDream @ 2023-08-06 15:36:54
@FurippuWRY 你厉害
by eegg @ 2023-08-06 17:31:38
@liyirong567
if(a[j-1]=0)
改为if(a[j-1]==0)
by XuZiyu0422 @ 2023-10-15 10:53:00
你起码还能做出来