题解 | #兔子的序列#

兔子的序列

https://www.nowcoder.com/practice/55fc2ebad3fd444bbb1754ba1b259762

#include <stdio.h>
#include<math.h>
int main() {
    int n,x;
    int a[1000];
    scanf("%d",&n);
    int max=0;
    for(int i=0;i<n;i++)
    {
        scanf("%d",&a[i]);
        x=sqrt(a[i]);//x为整形
        if(pow(x,2)==a[i])
        continue;
        else
        {
           if(a[i]>max)
           max=a[i];
        }
    }
    printf("%d\n",max);
    return 0;
}

#菜狗的解题#
全部评论

相关推荐

点赞 评论 收藏
分享
04-21 11:22
已编辑
中华女子学院 UE4
耐心学习_佩可officical:直接举报他,佬,违反劳动法我记得boss会下架
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务