結果

問題 No.376 立方体のN等分 (2)
ユーザー H3PO4H3PO4
提出日時 2020-07-10 09:24:12
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 2,029 ms / 5,000 ms
コード長 291 bytes
コンパイル時間 201 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 75,904 KB
最終ジャッジ日時 2024-04-18 02:51:40
合計ジャッジ時間 15,614 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
52,096 KB
testcase_01 AC 42 ms
52,352 KB
testcase_02 AC 164 ms
57,600 KB
testcase_03 AC 159 ms
61,312 KB
testcase_04 AC 175 ms
58,368 KB
testcase_05 AC 42 ms
52,096 KB
testcase_06 AC 42 ms
52,224 KB
testcase_07 AC 42 ms
51,968 KB
testcase_08 AC 50 ms
57,344 KB
testcase_09 AC 72 ms
57,216 KB
testcase_10 AC 206 ms
75,904 KB
testcase_11 AC 108 ms
57,472 KB
testcase_12 AC 125 ms
58,496 KB
testcase_13 AC 127 ms
57,216 KB
testcase_14 AC 135 ms
57,344 KB
testcase_15 AC 144 ms
57,216 KB
testcase_16 AC 1,811 ms
75,904 KB
testcase_17 AC 158 ms
57,472 KB
testcase_18 AC 162 ms
57,472 KB
testcase_19 AC 165 ms
59,264 KB
testcase_20 AC 167 ms
57,472 KB
testcase_21 AC 1,780 ms
75,776 KB
testcase_22 AC 173 ms
57,728 KB
testcase_23 AC 1,833 ms
75,904 KB
testcase_24 AC 1,769 ms
75,648 KB
testcase_25 AC 173 ms
57,472 KB
testcase_26 AC 2,029 ms
75,904 KB
testcase_27 AC 177 ms
57,600 KB
testcase_28 AC 178 ms
57,216 KB
testcase_29 AC 174 ms
57,472 KB
testcase_30 AC 174 ms
57,088 KB
testcase_31 AC 177 ms
57,728 KB
testcase_32 AC 177 ms
57,216 KB
testcase_33 AC 177 ms
57,600 KB
testcase_34 AC 177 ms
57,344 KB
testcase_35 AC 177 ms
57,472 KB
testcase_36 AC 176 ms
57,344 KB
testcase_37 AC 176 ms
57,472 KB
testcase_38 AC 174 ms
57,344 KB
testcase_39 AC 175 ms
57,600 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools
from math import isqrt

N = int(input())

div = [i for i in range(1, isqrt(N) + 1) if not N % i]

Nmin = Nmax = N - 1
for i, j in itertools.combinations_with_replacement(div, 2):
    if not N % (i * j):
        Nmin = min(Nmin, i + j + (N // (i * j)) - 3)
print(Nmin, Nmax)
0