fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. long long n;
  6. cin >> n;
  7. long long x=2;
  8. while (x*x<=n) {
  9. cout<<x*x<<endl;
  10. x++;
  11. }
  12. return 0;
  13. }
Success #stdin #stdout 0.01s 5320KB
stdin
16
stdout
4
9
16