結果

問題 No.376 立方体のN等分 (2)
ユーザー titiatitia
提出日時 2023-01-04 02:51:52
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 4,860 ms / 5,000 ms
コード長 277 bytes
コンパイル時間 328 ms
コンパイル使用メモリ 82,524 KB
実行使用メモリ 76,036 KB
最終ジャッジ日時 2024-05-05 09:51:47
合計ジャッジ時間 28,730 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
52,272 KB
testcase_01 AC 36 ms
52,616 KB
testcase_02 AC 154 ms
62,064 KB
testcase_03 AC 160 ms
65,440 KB
testcase_04 AC 172 ms
61,256 KB
testcase_05 AC 37 ms
53,184 KB
testcase_06 AC 37 ms
51,880 KB
testcase_07 AC 37 ms
52,484 KB
testcase_08 AC 44 ms
57,848 KB
testcase_09 AC 66 ms
57,720 KB
testcase_10 AC 349 ms
75,764 KB
testcase_11 AC 97 ms
57,760 KB
testcase_12 AC 122 ms
61,256 KB
testcase_13 AC 119 ms
58,604 KB
testcase_14 AC 126 ms
58,412 KB
testcase_15 AC 137 ms
57,940 KB
testcase_16 AC 4,215 ms
76,036 KB
testcase_17 AC 155 ms
60,628 KB
testcase_18 AC 153 ms
58,244 KB
testcase_19 AC 163 ms
62,160 KB
testcase_20 AC 159 ms
57,916 KB
testcase_21 AC 4,244 ms
76,020 KB
testcase_22 AC 165 ms
58,500 KB
testcase_23 AC 4,392 ms
75,788 KB
testcase_24 AC 4,238 ms
75,568 KB
testcase_25 AC 169 ms
58,136 KB
testcase_26 AC 4,860 ms
75,376 KB
testcase_27 AC 169 ms
59,044 KB
testcase_28 AC 169 ms
59,344 KB
testcase_29 AC 169 ms
58,192 KB
testcase_30 AC 170 ms
59,100 KB
testcase_31 AC 169 ms
57,116 KB
testcase_32 AC 169 ms
58,124 KB
testcase_33 AC 169 ms
58,240 KB
testcase_34 AC 170 ms
58,116 KB
testcase_35 AC 169 ms
58,128 KB
testcase_36 AC 170 ms
58,860 KB
testcase_37 AC 171 ms
58,128 KB
testcase_38 AC 171 ms
58,848 KB
testcase_39 AC 175 ms
61,312 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

x=int(input())

L=int(x**(1/2))

LIST=[]

for i in range(1,L+1):
    if x%i==0:
        LIST.append(i)
        LIST.append(x//i)


ANS=x

for a in LIST:
    for b in LIST:
        if a*b<=x and x%(a*b)==0:
            k=x//(a*b)
            ANS=min(ANS,a+b+k-3)

print(ANS,x-1)
0