結果

問題 No.375 立方体のN等分 (1)
ユーザー nebukuro09nebukuro09
提出日時 2016-10-30 16:49:24
言語 PyPy2
(7.3.15)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 286 bytes
コンパイル時間 2,195 ms
コンパイル使用メモリ 77,444 KB
実行使用メモリ 79,016 KB
最終ジャッジ日時 2023-08-16 11:20:37
合計ジャッジ時間 19,259 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
76,164 KB
testcase_01 AC 72 ms
76,400 KB
testcase_02 AC 567 ms
78,580 KB
testcase_03 AC 74 ms
76,748 KB
testcase_04 AC 73 ms
76,076 KB
testcase_05 AC 72 ms
76,520 KB
testcase_06 AC 77 ms
78,368 KB
testcase_07 AC 116 ms
78,436 KB
testcase_08 AC 462 ms
78,572 KB
testcase_09 AC 84 ms
78,168 KB
testcase_10 AC 97 ms
78,716 KB
testcase_11 AC 120 ms
78,632 KB
testcase_12 AC 124 ms
78,672 KB
testcase_13 AC 116 ms
78,504 KB
testcase_14 AC 1,750 ms
78,576 KB
testcase_15 AC 173 ms
78,504 KB
testcase_16 AC 107 ms
78,608 KB
testcase_17 AC 3,630 ms
78,688 KB
testcase_18 AC 1,939 ms
78,844 KB
testcase_19 AC 141 ms
78,444 KB
testcase_20 AC 93 ms
78,416 KB
testcase_21 AC 92 ms
78,504 KB
testcase_22 TLE -
testcase_23 AC 110 ms
78,552 KB
testcase_24 AC 93 ms
78,336 KB
testcase_25 AC 552 ms
78,636 KB
testcase_26 AC 94 ms
78,644 KB
testcase_27 AC 174 ms
78,688 KB
testcase_28 AC 84 ms
78,516 KB
testcase_29 AC 81 ms
77,420 KB
testcase_30 AC 93 ms
78,448 KB
testcase_31 AC 102 ms
78,392 KB
testcase_32 AC 81 ms
77,448 KB
testcase_33 AC 102 ms
78,668 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = input()
ans = float('inf')
a = 1
while a*a*a <= N:
    if N%a > 0:
        a += 1
        continue
    b = 1
    while b*b <= N:
        if N/a%b > 0:
            b += 1
            continue
        c = N/a/b
        ans = min(a+b+c-3, ans)
        b += 1
    a += 1
print ans, N-1
0