結果

問題 No.1585 Cubic Number
ユーザー chineristACchineristAC
提出日時 2021-07-08 22:21:43
言語 PyPy3
(7.3.8)
結果
AC  
実行時間 131 ms / 1,000 ms
コード長 457 bytes
コンパイル時間 332 ms
使用メモリ 78,752 KB
最終ジャッジ日時 2023-02-01 19:56:19
合計ジャッジ時間 5,853 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 129 ms
78,420 KB
testcase_01 AC 131 ms
78,752 KB
testcase_02 AC 128 ms
78,544 KB
testcase_03 AC 127 ms
78,568 KB
testcase_04 AC 127 ms
78,536 KB
testcase_05 AC 125 ms
78,556 KB
testcase_06 AC 128 ms
78,612 KB
testcase_07 AC 125 ms
78,752 KB
testcase_08 AC 128 ms
78,472 KB
testcase_09 AC 128 ms
78,612 KB
testcase_10 AC 128 ms
78,536 KB
testcase_11 AC 127 ms
78,536 KB
testcase_12 AC 129 ms
78,548 KB
testcase_13 AC 128 ms
78,500 KB
testcase_14 AC 128 ms
78,680 KB
testcase_15 AC 127 ms
78,472 KB
testcase_16 AC 127 ms
78,636 KB
testcase_17 AC 126 ms
78,480 KB
testcase_18 AC 126 ms
78,672 KB
testcase_19 AC 127 ms
78,484 KB
testcase_20 AC 127 ms
78,564 KB
testcase_21 AC 127 ms
78,560 KB
testcase_22 AC 127 ms
78,584 KB
testcase_23 AC 128 ms
78,616 KB
testcase_24 AC 127 ms
78,636 KB
testcase_25 AC 128 ms
78,404 KB
testcase_26 AC 128 ms
78,592 KB
testcase_27 AC 128 ms
78,592 KB
testcase_28 AC 128 ms
78,552 KB
testcase_29 AC 128 ms
78,644 KB
testcase_30 AC 128 ms
78,652 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