結果

問題 No.376 立方体のN等分 (2)
ユーザー ynyn
提出日時 2016-06-05 02:15:04
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 438 bytes
コンパイル時間 151 ms
コンパイル使用メモリ 82,492 KB
実行使用メモリ 63,104 KB
最終ジャッジ日時 2024-04-17 03:50:25
合計ジャッジ時間 14,754 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
52,096 KB
testcase_01 AC 38 ms
51,840 KB
testcase_02 AC 161 ms
59,520 KB
testcase_03 AC 157 ms
60,800 KB
testcase_04 AC 171 ms
58,752 KB
testcase_05 AC 36 ms
51,968 KB
testcase_06 AC 36 ms
51,712 KB
testcase_07 AC 36 ms
51,712 KB
testcase_08 AC 45 ms
57,472 KB
testcase_09 AC 68 ms
57,472 KB
testcase_10 AC 170 ms
62,592 KB
testcase_11 AC 99 ms
58,112 KB
testcase_12 AC 123 ms
59,392 KB
testcase_13 AC 123 ms
57,600 KB
testcase_14 AC 132 ms
57,472 KB
testcase_15 AC 144 ms
57,600 KB
testcase_16 AC 1,649 ms
62,976 KB
testcase_17 AC 157 ms
58,112 KB
testcase_18 AC 159 ms
57,856 KB
testcase_19 AC 168 ms
59,264 KB
testcase_20 AC 167 ms
57,728 KB
testcase_21 AC 1,678 ms
63,104 KB
testcase_22 AC 173 ms
57,728 KB
testcase_23 AC 1,733 ms
62,720 KB
testcase_24 AC 1,656 ms
62,976 KB
testcase_25 AC 175 ms
57,840 KB
testcase_26 AC 1,889 ms
62,720 KB
testcase_27 WA -
testcase_28 AC 179 ms
57,728 KB
testcase_29 AC 175 ms
57,728 KB
testcase_30 AC 175 ms
57,600 KB
testcase_31 AC 178 ms
57,776 KB
testcase_32 AC 175 ms
57,472 KB
testcase_33 AC 176 ms
58,112 KB
testcase_34 AC 180 ms
57,472 KB
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 AC 177 ms
58,240 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
tmax = n - 1
tmin = 10**12
i = 1
f = []

while i * i <= n:
    if n % i == 0:
        f.append(i)
    i += 1

for i in f:
    if n % i == 0:
        fac1 = i
        fac2fac3 = n // fac1
        for j in f:
            if fac2fac3 % j == 0:
                fac2 = j
                fac3 = fac2fac3 // fac2
                tmin = min(fac1 + fac2 + fac3 - 3, tmin)
                #print(fac1,fac2,fac3)

print(tmin, tmax)
0