結果

問題 No.375 立方体のN等分 (1)
ユーザー AttomakeAttomake
提出日時 2020-04-05 20:08:12
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 2,124 ms / 5,000 ms
コード長 300 bytes
コンパイル時間 87 ms
コンパイル使用メモリ 10,652 KB
実行使用メモリ 7,944 KB
最終ジャッジ日時 2023-09-17 04:17:51
合計ジャッジ時間 11,164 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,724 KB
testcase_01 AC 15 ms
7,876 KB
testcase_02 AC 400 ms
7,720 KB
testcase_03 AC 15 ms
7,776 KB
testcase_04 AC 15 ms
7,792 KB
testcase_05 AC 15 ms
7,864 KB
testcase_06 AC 19 ms
7,812 KB
testcase_07 AC 64 ms
7,812 KB
testcase_08 AC 259 ms
7,768 KB
testcase_09 AC 65 ms
7,728 KB
testcase_10 AC 123 ms
7,784 KB
testcase_11 AC 117 ms
7,792 KB
testcase_12 AC 142 ms
7,812 KB
testcase_13 AC 145 ms
7,944 KB
testcase_14 AC 899 ms
7,808 KB
testcase_15 AC 201 ms
7,816 KB
testcase_16 AC 152 ms
7,780 KB
testcase_17 AC 1,564 ms
7,808 KB
testcase_18 AC 999 ms
7,876 KB
testcase_19 AC 195 ms
7,772 KB
testcase_20 AC 119 ms
7,808 KB
testcase_21 AC 117 ms
7,744 KB
testcase_22 AC 2,124 ms
7,780 KB
testcase_23 AC 164 ms
7,796 KB
testcase_24 AC 118 ms
7,796 KB
testcase_25 AC 358 ms
7,876 KB
testcase_26 AC 154 ms
7,780 KB
testcase_27 AC 203 ms
7,876 KB
testcase_28 AC 117 ms
7,772 KB
testcase_29 AC 117 ms
7,772 KB
testcase_30 AC 153 ms
7,792 KB
testcase_31 AC 180 ms
7,816 KB
testcase_32 AC 117 ms
7,796 KB
testcase_33 AC 164 ms
7,784 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())

kiroku=N-1
for i in range(int(N**0.5)+1):
    if N%(i+1)!=0:
        continue
    n=int(N/(i+1))
    for j in range(int(n**0.5)+1):
        if n%(j+1)!=0:
            continue
        unta=i+j+int(n/(j+1))-1
        if unta<kiroku:
            kiroku=unta

print(str(kiroku),str(N-1))
0