4 条题解

  • -1
    @ 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; }

    • -1
      @ 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; }

      • -1
        @ 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;
        }
        

        }

        • -1
          @ 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

          信息

          ID
          224
          时间
          1000ms
          内存
          64MiB
          难度
          4
          标签
          递交数
          78
          已通过
          37
          上传者