1 solutions

  • 0
    @ 2024-2-9 11:38:01

    世界上最好的题解😄

    #include<bits/stdc++.h>
    using namespace std;
    int main(){
        int c;
        cin>>c;
        for(int a=1;a<c;a++){
        	int b=sqrt(c*c-a*a);
        	if(b*b+a*a==c*c){
        		cout<<a<<" "<<b;
        		return 0;
    		}
    	}
        return 0;
    }
    

    看完别忘了点赞呦👀️

    • 1

    Information

    ID
    7965
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    1
    Tags
    # Submissions
    5
    Accepted
    2
    Uploaded By