提交时间:2026-06-19 15:52:34
运行 ID: 91914
#include <bits/stdc++.h> using namespace std ; int main() { int n ; cin >> n ; for(int i = 1 ; i <= n ; i++) { int x ; cin >> x ; for(int y = 1 ; y * y < x ; y++) { int tmp = x - y * y ; int tmp2 = sqrt(1.0 * tmp) ; if(tmp * tmp == tmp2) cout << "Yes\n" ; else cout << "No\n" ; } } return 0 ; }