1 solutions

  • 0
    @ 2024-12-4 19:37:03

    C++ :

    #include<iostream>
    using namespace std;
    int main()
    {
    	int l,r;
    	for (int i=1000; i<=9999; i++){
    		l=i/100;
    		r=i%100;
    		if (i==(l+r)*(l+r))
    			cout<<i<<endl;
    	}
    	return 0;
    }
    
    • 1

    Information

    ID
    2266
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    (None)
    Tags
    # Submissions
    0
    Accepted
    0
    Uploaded By