結果

問題 No.375 立方体のN等分 (1)
ユーザー compass19compass19
提出日時 2016-06-05 12:04:30
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 332 ms / 5,000 ms
コード長 224 bytes
コンパイル時間 391 ms
コンパイル使用メモリ 10,564 KB
実行使用メモリ 14,040 KB
最終ジャッジ日時 2023-08-02 01:38:16
合計ジャッジ時間 3,045 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 13 ms
7,792 KB
testcase_01 AC 13 ms
7,936 KB
testcase_02 AC 35 ms
7,808 KB
testcase_03 AC 13 ms
7,980 KB
testcase_04 AC 14 ms
7,968 KB
testcase_05 AC 13 ms
7,804 KB
testcase_06 AC 14 ms
7,820 KB
testcase_07 AC 18 ms
7,788 KB
testcase_08 AC 38 ms
8,928 KB
testcase_09 AC 26 ms
7,800 KB
testcase_10 AC 28 ms
7,772 KB
testcase_11 AC 28 ms
7,844 KB
testcase_12 AC 28 ms
7,852 KB
testcase_13 AC 35 ms
7,888 KB
testcase_14 AC 77 ms
9,992 KB
testcase_15 AC 33 ms
7,840 KB
testcase_16 AC 35 ms
7,792 KB
testcase_17 AC 206 ms
11,288 KB
testcase_18 AC 77 ms
9,868 KB
testcase_19 AC 37 ms
7,800 KB
testcase_20 AC 44 ms
7,780 KB
testcase_21 AC 44 ms
7,792 KB
testcase_22 AC 332 ms
14,040 KB
testcase_23 AC 44 ms
7,840 KB
testcase_24 AC 44 ms
7,736 KB
testcase_25 AC 39 ms
7,844 KB
testcase_26 AC 42 ms
7,836 KB
testcase_27 AC 37 ms
7,740 KB
testcase_28 AC 44 ms
7,964 KB
testcase_29 AC 43 ms
7,860 KB
testcase_30 AC 45 ms
7,932 KB
testcase_31 AC 45 ms
7,836 KB
testcase_32 AC 42 ms
7,804 KB
testcase_33 AC 42 ms
7,784 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
l = int(n**(1/2))
y = [i for i in range(1,l+1) if n%i == 0]
x = [n//i for i in y]
y = y + x
x = [a+b+n//(a*b)-3 for a in y if a**3 <= n for b in y if b >= a and n%(a*b) == 0 and a*b*b <= n]
print(min(x),n-1)
0