题意很简单就不说了。 无理数+任意数都为无理数。 代码: //author: CHC//First Edit Time: 2015-06-23 11:50#include <iostream>#include <cstdio>#include <cstring>#include <cmath>#include <set>#include <vector>#include <map>#include <queue>#include <set>#include <algorithm>#include <limits>using namespace std;typedef long long LL;const int INF = numeric_limits<int>::max();const LL LL_INF= numeric_limits<LL>::max();int main(){ int n; while(~scanf("%d",&n)){ int flag=0; for(int i=0;i<n;i++){ int x; scanf("%d",&x); int tmp=sqrt(1.0*x); if(tmp*tmp!=x)flag=1; } puts(flag?"No":"Yes"); } return 0;}