1 条题解

  • 0
    @ 2025-10-10 19:47:20

    C++ :

    #include <bits/stdc++.h>
    using namespace std;
    
    int main(){
    	int n;
    	cin>>n;
    	int x=sqrt(n);
    	if(x*x==n){
    		cout<<"Y";
    	}else{
    		cout<<"N";
    	}
    }
    

    Python :

    n=int(input())
    m=round(n**0.5)
    if m**2==n:
        print("Y")
    else:
        print("N")
    
    • 1

    信息

    ID
    1036
    时间
    1000ms
    内存
    512MiB
    难度
    (无)
    标签
    递交数
    0
    已通过
    0
    上传者