4 solutions

  • 0
    @ 2025-9-7 16:09:21

    #include <bits/stdc++.h> using namespace std;

    int main() { for (int i = 1000; i <= 9999; i++) { int a, s ; a = i / 100; s = i % 100; if ((a + s) * (a + s) == i) { cout << i << " "; } } return 0; }

    • 0
      @ 2025-9-7 16:07:53

      #include <bits/stdc++.h> using namespace std;

      int main() { for (int i = 1000; i <= 9999; i++) { int a = 0, s = 0; a = i / 100; s = i % 100; if ((a + s) * (a + s) == i) { cout << i << " "; } } return 0; }

      • 0
        @ 2025-9-7 16:07:20

        #include <bits/stdc++.h> using namespace std;

        int main() { #include <bits/stdc++.h> using namespace std;

        int main() {
        	for (int i = 1000; i <= 9999; i++) {
        		int a = 0, s = 0;
        		a = i / 100;
        		s = i % 100;
        		if ((a + s) * (a + s) == i) {
        			cout << i << " ";
        		}
        	}
        	return 0;
        }
        

        }

        • 0
          @ 2025-9-7 16:05:55

          #include <bits/stdc++.h> using namespace std;

          int main() { for (int i = 1000; i <= 9999; i++) { int a = 0, s = 0; a = i / 100; s = i % 100; if ((a + s) * (a + s) == i) { cout << i << " "; } } return 0; }

          • 1

          Information

          ID
          224
          Time
          1000ms
          Memory
          64MiB
          Difficulty
          4
          Tags
          # Submissions
          67
          Accepted
          32
          Uploaded By