結果

問題 No.1585 Cubic Number
ユーザー chineristACchineristAC
提出日時 2021-07-08 22:21:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 117 ms / 1,000 ms
コード長 457 bytes
コンパイル時間 283 ms
コンパイル使用メモリ 86,728 KB
実行使用メモリ 74,932 KB
最終ジャッジ日時 2023-09-14 06:02:27
合計ジャッジ時間 5,031 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
74,796 KB
testcase_01 AC 109 ms
74,764 KB
testcase_02 AC 109 ms
74,656 KB
testcase_03 AC 109 ms
74,624 KB
testcase_04 AC 107 ms
74,888 KB
testcase_05 AC 108 ms
74,688 KB
testcase_06 AC 112 ms
74,380 KB
testcase_07 AC 111 ms
74,384 KB
testcase_08 AC 110 ms
74,484 KB
testcase_09 AC 110 ms
74,668 KB
testcase_10 AC 110 ms
74,472 KB
testcase_11 AC 109 ms
74,420 KB
testcase_12 AC 109 ms
74,488 KB
testcase_13 AC 110 ms
74,768 KB
testcase_14 AC 111 ms
74,780 KB
testcase_15 AC 109 ms
74,928 KB
testcase_16 AC 110 ms
74,496 KB
testcase_17 AC 111 ms
74,608 KB
testcase_18 AC 112 ms
74,316 KB
testcase_19 AC 110 ms
74,848 KB
testcase_20 AC 110 ms
74,580 KB
testcase_21 AC 108 ms
74,432 KB
testcase_22 AC 112 ms
74,584 KB
testcase_23 AC 112 ms
74,424 KB
testcase_24 AC 108 ms
74,304 KB
testcase_25 AC 109 ms
74,860 KB
testcase_26 AC 110 ms
74,472 KB
testcase_27 AC 109 ms
74,708 KB
testcase_28 AC 110 ms
74,928 KB
testcase_29 AC 112 ms
74,932 KB
testcase_30 AC 109 ms
74,396 KB
権限があれば一括ダウンロードができます

ソースコード

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