题解 | #兔子的序列#

兔子的序列

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

#include <stdio.h>
#include <math.h>
int main() 
{
    int max = 0;
    int n = 0;
    scanf("%d",&n);
    int num = 0;
    for(int i = 0;i<n;i++)
    {
        scanf("%d",&num);

        if((int)pow((int)sqrt(num),2) != num)
        {
            if(num>max)
            {
                max = num;
            }
        }
 
    }
    printf("%d\n",max);
    
    return 0;
}

全部评论

相关推荐

我就是0offer糕手:北大不乱杀
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务