結果

問題 No.375 立方体のN等分 (1)
ユーザー Akijin_007Akijin_007
提出日時 2023-09-01 14:18:38
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 259 ms / 5,000 ms
コード長 384 bytes
コンパイル時間 595 ms
コンパイル使用メモリ 87,336 KB
実行使用メモリ 76,944 KB
最終ジャッジ日時 2023-09-01 14:18:45
合計ジャッジ時間 6,262 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,960 KB
testcase_01 AC 68 ms
71,632 KB
testcase_02 AC 109 ms
76,700 KB
testcase_03 AC 70 ms
71,916 KB
testcase_04 AC 71 ms
71,724 KB
testcase_05 AC 69 ms
71,664 KB
testcase_06 AC 76 ms
76,540 KB
testcase_07 AC 83 ms
76,636 KB
testcase_08 AC 103 ms
76,596 KB
testcase_09 AC 82 ms
76,644 KB
testcase_10 AC 83 ms
76,448 KB
testcase_11 AC 81 ms
76,676 KB
testcase_12 AC 84 ms
76,476 KB
testcase_13 AC 84 ms
76,628 KB
testcase_14 AC 161 ms
76,724 KB
testcase_15 AC 89 ms
76,784 KB
testcase_16 AC 84 ms
76,632 KB
testcase_17 AC 222 ms
76,944 KB
testcase_18 AC 176 ms
76,768 KB
testcase_19 AC 87 ms
76,488 KB
testcase_20 AC 80 ms
76,540 KB
testcase_21 AC 79 ms
76,796 KB
testcase_22 AC 259 ms
76,820 KB
testcase_23 AC 84 ms
76,524 KB
testcase_24 AC 80 ms
76,800 KB
testcase_25 AC 105 ms
76,468 KB
testcase_26 AC 82 ms
76,652 KB
testcase_27 AC 88 ms
76,660 KB
testcase_28 AC 85 ms
76,516 KB
testcase_29 AC 78 ms
76,516 KB
testcase_30 AC 84 ms
76,660 KB
testcase_31 AC 87 ms
76,796 KB
testcase_32 AC 78 ms
76,348 KB
testcase_33 AC 85 ms
76,744 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#int(input())
#map(int, input().split())
#list(map(int, input().split()))

N = int(input())

ans = N-1
n3 = int(N ** (1/3)) + 5

for i in range(1, N):
    if i ** 3 > N:
        break
    if N % i != 0:
        continue
    u = N // i
    for j in range(1, u):
        if j ** 2 > u:
            break
        if u % j == 0:
            ans = min(ans, i+j+(u//j)-3)

print(ans, N-1)

0