結果

問題 No.375 立方体のN等分 (1)
ユーザー JunOnumaJunOnuma
提出日時 2017-05-24 13:15:25
言語 Python2
(2.7.18)
結果
AC  
実行時間 1,779 ms / 5,000 ms
コード長 268 bytes
コンパイル時間 60 ms
コンパイル使用メモリ 7,084 KB
実行使用メモリ 6,384 KB
最終ジャッジ日時 2023-10-19 19:56:52
合計ジャッジ時間 9,460 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
6,384 KB
testcase_01 AC 12 ms
6,384 KB
testcase_02 AC 359 ms
6,384 KB
testcase_03 AC 11 ms
6,384 KB
testcase_04 AC 11 ms
6,384 KB
testcase_05 AC 11 ms
6,384 KB
testcase_06 AC 14 ms
6,384 KB
testcase_07 AC 55 ms
6,384 KB
testcase_08 AC 234 ms
6,384 KB
testcase_09 AC 43 ms
6,384 KB
testcase_10 AC 102 ms
6,384 KB
testcase_11 AC 94 ms
6,384 KB
testcase_12 AC 118 ms
6,384 KB
testcase_13 AC 117 ms
6,384 KB
testcase_14 AC 826 ms
6,384 KB
testcase_15 AC 173 ms
6,384 KB
testcase_16 AC 116 ms
6,384 KB
testcase_17 AC 1,376 ms
6,384 KB
testcase_18 AC 927 ms
6,384 KB
testcase_19 AC 164 ms
6,384 KB
testcase_20 AC 74 ms
6,384 KB
testcase_21 AC 72 ms
6,384 KB
testcase_22 AC 1,779 ms
6,384 KB
testcase_23 AC 124 ms
6,384 KB
testcase_24 AC 70 ms
6,384 KB
testcase_25 AC 322 ms
6,384 KB
testcase_26 AC 110 ms
6,384 KB
testcase_27 AC 168 ms
6,384 KB
testcase_28 AC 70 ms
6,384 KB
testcase_29 AC 70 ms
6,384 KB
testcase_30 AC 110 ms
6,384 KB
testcase_31 AC 140 ms
6,384 KB
testcase_32 AC 70 ms
6,384 KB
testcase_33 AC 123 ms
6,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(raw_input())
mn = n - 1
a = 1
while a**3 <= n:
    if n % a != 0:
        a += 1
        continue
    m = n / a
    b = a
    while b*b <= m:
        if m % b == 0:
            c = m / b
            mn = min(mn, a+b+c-3)
        b += 1
    a += 1
print mn,n-1
0