結果

問題 No.1585 Cubic Number
ユーザー kens
提出日時 2021-07-08 23:01:11
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 1,000 ms
コード長 323 bytes
コンパイル時間 2,114 ms
コンパイル使用メモリ 192,304 KB
最終ジャッジ日時 2025-01-22 19:08:11
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 28
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < (int)n; i++)
using ll = long long;
constexpr ll MAX = 1e6;

int main(){
  ll n;
  cin >> n;
  for(ll x = 1; x*x*x <= n; x++) {
    if(x*x*x == n) {
      cout << "Yes" << endl;
      return 0;
    }
  }
  cout << "No" << endl;
  return 0;
}
0