#include <bits/stdc++.h>
using namespace std;
int main(){
int n,k1,k2;cin >> n;
cout <<"{";
int first=1;
for(k2=0;k2*k2<=n;k2++){
if((k2*k2-1)%3==0){
if(first){
cout << k2*k2;
first=0;
}
else cout <<", "<< k2*k2;
}
}
cout << "}";
return 0;
}
集合1的题解
最新推荐文章于 2024-11-12 21:59:57 发布