fork download
  1.  
  2. /**
  3.  * author: orzvanh14 ( )
  4.  * created: 23.12.2022 10:08:02
  5.  * too lazy to update time
  6. **/
  7. // i wants to take ioi
  8. //binhtinhtutinkhongcaycunhungmotkhikhongcontutinnualatuyetvong
  9. #include <bits/stdc++.h>
  10.  
  11. using namespace std;
  12.  
  13. #define int long long
  14. #define nn "\n"
  15. #define pi pair<int, int>
  16. #define fi first
  17. #define se second
  18. #define lb lower_bound
  19. #define ub upper_bound
  20. #define eb emplace_back
  21. #define pb push_back
  22. #define TASK " "
  23.  
  24. #define ms(a, x) memset(a, x, sizeof(a))
  25. #define all(a) a.begin(), a.end()
  26. #define All(a, n) a + 1, a + 1 + n
  27.  
  28. #define LOG 19
  29.  
  30.  
  31. const int INF = 1e18;
  32. const int mod = 1e9+7;
  33. const int N = 2e5 + 5;
  34. int MOD = 998244353;
  35. int bit[200000];
  36. struct node{
  37. int kc, u, hk;
  38. bool operator<(const node& other) const {
  39. return kc > other.kc;
  40. }
  41. };
  42. struct edge{
  43. int v, w, h;
  44. };
  45. int t;
  46. void nhap(){
  47. cin >> t;
  48. while(t--){
  49. int n; cin >> n;
  50. int c = cbrt(n);
  51. if(c * c * c == n){
  52. cout << "YES" << nn;
  53. }
  54. else cout << "NO" << nn;
  55. }
  56. }
  57. void solve(){
  58.  
  59. }
  60. signed main() {
  61. // freopen("piggyback.in", "r", stdin);
  62. // freopen("piggyback.out", "w", stdout);
  63. ios_base::sync_with_stdio(0);
  64. cin.tie(0);
  65. cout.tie(0);
  66. nhap();
  67. solve();
  68. return (0 ^ 0);
  69.  
  70. }
Success #stdin #stdout 0s 5316KB
stdin
5
2
8
4
27 
1000
stdout
NO
YES
NO
YES
YES