結果

問題 No.1585 Cubic Number
ユーザー mkawa2mkawa2
提出日時 2021-07-08 22:21:36
言語 Python3
(3.10.1 + numpy 1.22.3 + scipy 1.8.0)
結果
AC  
実行時間 574 ms / 1,000 ms
コード長 757 bytes
コンパイル時間 354 ms
使用メモリ 7,864 KB
最終ジャッジ日時 2023-02-01 19:54:57
合計ジャッジ時間 8,814 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 564 ms
7,816 KB
testcase_01 AC 16 ms
7,760 KB
testcase_02 AC 15 ms
7,816 KB
testcase_03 AC 15 ms
7,704 KB
testcase_04 AC 16 ms
7,708 KB
testcase_05 AC 15 ms
7,620 KB
testcase_06 AC 15 ms
7,764 KB
testcase_07 AC 15 ms
7,708 KB
testcase_08 AC 15 ms
7,788 KB
testcase_09 AC 15 ms
7,756 KB
testcase_10 AC 15 ms
7,704 KB
testcase_11 AC 15 ms
7,712 KB
testcase_12 AC 397 ms
7,624 KB
testcase_13 AC 214 ms
7,812 KB
testcase_14 AC 318 ms
7,652 KB
testcase_15 AC 16 ms
7,752 KB
testcase_16 AC 15 ms
7,756 KB
testcase_17 AC 15 ms
7,700 KB
testcase_18 AC 459 ms
7,620 KB
testcase_19 AC 548 ms
7,632 KB
testcase_20 AC 142 ms
7,816 KB
testcase_21 AC 410 ms
7,756 KB
testcase_22 AC 326 ms
7,812 KB
testcase_23 AC 451 ms
7,712 KB
testcase_24 AC 565 ms
7,812 KB
testcase_25 AC 470 ms
7,708 KB
testcase_26 AC 492 ms
7,620 KB
testcase_27 AC 401 ms
7,636 KB
testcase_28 AC 16 ms
7,656 KB
testcase_29 AC 15 ms
7,616 KB
testcase_30 AC 574 ms
7,864 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

# sys.setrecursionlimit(200005)
int1 = lambda x: int(x)-1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]
def SI(): return sys.stdin.readline().rstrip()
dij = [(0, 1), (-1, 0), (0, -1), (1, 0)]
# dij = [(0, 1), (-1, 0), (0, -1), (1, 0), (1, 1), (1, -1), (-1, 1), (-1, -1)]
inf = 10**16
# md = 998244353
md = 10**9+7

n=II()

for a in range(1,10**6+1):
    c=a**3
    if c==n:
        print("Yes")
        break
    if c>n:
        print("No")
        break

0