题解 | #兔子的序列#

兔子的序列

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

#include <stdio.h>
#include<math.h>
int main() {
   int a = 0;
   scanf("%d",&a);
   int arr[a];
   for(int i = 0;i < a;i++)
   {
    scanf("%d",arr+i);
   }
    int max = 0;
 for (int j = 0; j < a; j++)
 {
     if ( sqrt(arr[j])!= (int)sqrt(arr[j]))
     {
         if (arr[j]> max)
             max = arr[j];
     }
 }
   printf("%d\n",max);
    return 0;
}

全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

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