結果

問題 No.375 立方体のN等分 (1)
ユーザー first_vilfirst_vil
提出日時 2020-07-02 20:08:24
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 240 ms / 5,000 ms
コード長 201 bytes
コンパイル時間 265 ms
コンパイル使用メモリ 87,084 KB
実行使用メモリ 76,292 KB
最終ジャッジ日時 2023-10-13 06:27:49
合計ジャッジ時間 5,357 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 64 ms
71,368 KB
testcase_01 AC 61 ms
71,332 KB
testcase_02 AC 107 ms
75,900 KB
testcase_03 AC 66 ms
71,396 KB
testcase_04 AC 68 ms
71,472 KB
testcase_05 AC 67 ms
71,264 KB
testcase_06 AC 73 ms
75,684 KB
testcase_07 AC 77 ms
76,080 KB
testcase_08 AC 99 ms
76,292 KB
testcase_09 AC 76 ms
75,832 KB
testcase_10 AC 82 ms
76,076 KB
testcase_11 AC 76 ms
76,064 KB
testcase_12 AC 78 ms
76,080 KB
testcase_13 AC 80 ms
76,168 KB
testcase_14 AC 151 ms
76,144 KB
testcase_15 AC 87 ms
76,096 KB
testcase_16 AC 80 ms
75,928 KB
testcase_17 AC 204 ms
75,848 KB
testcase_18 AC 153 ms
76,248 KB
testcase_19 AC 80 ms
76,076 KB
testcase_20 AC 75 ms
75,972 KB
testcase_21 AC 74 ms
75,972 KB
testcase_22 AC 240 ms
75,972 KB
testcase_23 AC 78 ms
75,904 KB
testcase_24 AC 77 ms
76,056 KB
testcase_25 AC 99 ms
76,156 KB
testcase_26 AC 77 ms
75,872 KB
testcase_27 AC 87 ms
75,976 KB
testcase_28 AC 79 ms
75,644 KB
testcase_29 AC 75 ms
75,748 KB
testcase_30 AC 79 ms
76,072 KB
testcase_31 AC 80 ms
76,120 KB
testcase_32 AC 72 ms
75,884 KB
testcase_33 AC 77 ms
75,912 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
t=n
i=1
while i*i*i<=n:
    if n%i==0:
        m=n//i;
        j=1
        while j*j<=m:
            if m%j==0:
                t=min(t,i+j+m//j-3)
            j+=1
    i+=1
print(t,n-1)
0