結果

問題 No.1585 Cubic Number
ユーザー chineristAC
提出日時 2021-07-08 22:21:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 49 ms / 1,000 ms
コード長 457 bytes
コンパイル時間 146 ms
コンパイル使用メモリ 82,248 KB
実行使用メモリ 55,936 KB
最終ジャッジ日時 2024-07-01 13:37:17
合計ジャッジ時間 2,556 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 28
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys,random,bisect
from collections import deque,defaultdict
from heapq import heapify,heappop,heappush
from itertools import permutations
from math import gcd,log

input = lambda :sys.stdin.readline().rstrip()
mi = lambda :map(int,input().split())
li = lambda :list(mi())

N = int(input())

ok = 0
ng = 10**6 + 10
while ng-ok>1:
    mid = (ok+ng)//2
    if mid**3 <= N:
        ok = mid
    else:
        ng = mid

print("Yes" if ok**3==N else "No")
0