Heron
public cpp v1 · immutable#include <iostream>#include <iomanip>using namespace std;int main(int argv, char**argc){ int n; while (true) { n = -1; cin >> n; if(n <= 0) break; n /= 2; int max = 1; for(int i=0;i<n;i++) max *= 10; for (int a=0;a<max;a++) { for (int b=0;b<max;b++) { if ((a+b)*(a+b) == (a*max + b)) { cout << setw(n) << setfill('0') << a; cout << setw(n) << setfill('0') << b; cout << endl; } } } } return 0;}