我真不会啊,能发一下吗

img


#include <stdio.h>
#include <math.h>
int main()
{
    float a, b;
    scanf("%f %f", &a, &b);
    if (fabs(sqrt(a * a + b *b )) - 1 < 1e-3)
        printf("%Y\n");
    else
        printf("N\n");
    return 0;
}
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
float x,y;
cin >> x >> y;
int d = (int) (sqrt(x*x+y*y)*1000);
if(  d == 1000)
  cout << "Y" << endl;
else
  cout << "N" << endl;
return 0;
}