#include <iostream> #include <cmath> using namespace std; int main() { double y=0; int count = 0; for (double x = 1; count < 100; x++){ y = 81000000 - 18000*sqrt(x) + x; if (y - floor(y)==0){ count++; cout << x << " " << y << endl; } } return 0; }
Standard input is empty
1 8.0982e+07 4 8.0964e+07 9 8.0946e+07 16 8.0928e+07 25 8.091e+07 36 8.0892e+07 49 8.0874e+07 64 8.08561e+07 81 8.08381e+07 100 8.08201e+07 121 8.08021e+07 144 8.07841e+07 169 8.07662e+07 196 8.07482e+07 225 8.07302e+07 256 8.07123e+07 289 8.06943e+07 324 8.06763e+07 361 8.06584e+07 400 8.06404e+07 441 8.06224e+07 484 8.06045e+07 529 8.05865e+07 576 8.05686e+07 625 8.05506e+07 676 8.05327e+07 729 8.05147e+07 784 8.04968e+07 841 8.04788e+07 900 8.04609e+07 961 8.0443e+07 1024 8.0425e+07 1089 8.04071e+07 1156 8.03892e+07 1225 8.03712e+07 1296 8.03533e+07 1369 8.03354e+07 1444 8.03174e+07 1521 8.02995e+07 1600 8.02816e+07 1681 8.02637e+07 1764 8.02458e+07 1849 8.02278e+07 1936 8.02099e+07 2025 8.0192e+07 2116 8.01741e+07 2209 8.01562e+07 2304 8.01383e+07 2401 8.01204e+07 2500 8.01025e+07 2601 8.00846e+07 2704 8.00667e+07 2809 8.00488e+07 2916 8.00309e+07 3025 8.0013e+07 3136 7.99951e+07 3249 7.99772e+07 3364 7.99594e+07 3481 7.99415e+07 3600 7.99236e+07 3721 7.99057e+07 3844 7.98878e+07 3969 7.987e+07 4096 7.98521e+07 4225 7.98342e+07 4356 7.98164e+07 4489 7.97985e+07 4624 7.97806e+07 4761 7.97628e+07 4900 7.97449e+07 5041 7.9727e+07 5184 7.97092e+07 5329 7.96913e+07 5476 7.96735e+07 5625 7.96556e+07 5776 7.96378e+07 5929 7.96199e+07 6084 7.96021e+07 6241 7.95842e+07 6400 7.95664e+07 6561 7.95486e+07 6724 7.95307e+07 6889 7.95129e+07 7056 7.94951e+07 7225 7.94772e+07 7396 7.94594e+07 7569 7.94416e+07 7744 7.94237e+07 7921 7.94059e+07 8100 7.93881e+07 8281 7.93703e+07 8464 7.93525e+07 8649 7.93346e+07 8836 7.93168e+07 9025 7.9299e+07 9216 7.92812e+07 9409 7.92634e+07 9604 7.92456e+07 9801 7.92278e+07 10000 7.921e+07