結果

問題 No.375 立方体のN等分 (1)
ユーザー Coki628Coki628
提出日時 2020-09-24 16:01:23
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 337 ms / 5,000 ms
コード長 988 bytes
コンパイル時間 333 ms
コンパイル使用メモリ 87,676 KB
実行使用メモリ 77,252 KB
最終ジャッジ日時 2023-09-10 13:29:27
合計ジャッジ時間 5,357 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,828 KB
testcase_01 AC 71 ms
71,680 KB
testcase_02 AC 131 ms
76,492 KB
testcase_03 AC 71 ms
71,680 KB
testcase_04 AC 72 ms
71,868 KB
testcase_05 AC 72 ms
71,676 KB
testcase_06 AC 75 ms
76,180 KB
testcase_07 AC 83 ms
76,396 KB
testcase_08 AC 112 ms
76,368 KB
testcase_09 AC 82 ms
76,324 KB
testcase_10 AC 89 ms
76,336 KB
testcase_11 AC 87 ms
76,216 KB
testcase_12 AC 91 ms
76,404 KB
testcase_13 AC 92 ms
76,320 KB
testcase_14 AC 197 ms
76,492 KB
testcase_15 AC 99 ms
76,356 KB
testcase_16 AC 91 ms
76,112 KB
testcase_17 AC 281 ms
77,252 KB
testcase_18 AC 215 ms
76,388 KB
testcase_19 AC 99 ms
76,292 KB
testcase_20 AC 85 ms
76,140 KB
testcase_21 AC 83 ms
76,220 KB
testcase_22 AC 337 ms
77,068 KB
testcase_23 AC 91 ms
76,140 KB
testcase_24 AC 85 ms
76,472 KB
testcase_25 AC 124 ms
76,428 KB
testcase_26 AC 91 ms
76,308 KB
testcase_27 AC 99 ms
76,372 KB
testcase_28 AC 84 ms
76,288 KB
testcase_29 AC 82 ms
76,276 KB
testcase_30 AC 90 ms
76,276 KB
testcase_31 AC 94 ms
76,308 KB
testcase_32 AC 82 ms
76,224 KB
testcase_33 AC 92 ms
76,308 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c for j in range(b)] for i in range(a)]
def list3d(a, b, c, d): return [[[d for k in range(c)] for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e for l in range(d)] for k in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10**9)
INF = 10**18
MOD = 10**9 + 7
EPS = 10**-10

N = INT()

mn = INF
for i in range(1, round(pow(N, 1/3))+1):
    if N % i != 0:
        continue
    jk = N // i
    for j in range(i, round(pow(jk, 1/2))+1):
        if jk % j != 0 and jk // j != 0:
            continue
        k = jk // j
        mn = min(mn, i+j+k-3)
print(mn, N-1)
0