結果

問題 No.375 立方体のN等分 (1)
ユーザー tookunn_1213tookunn_1213
提出日時 2016-06-05 01:26:14
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 132 ms / 5,000 ms
コード長 263 bytes
コンパイル時間 208 ms
コンパイル使用メモリ 82,388 KB
実行使用メモリ 63,060 KB
最終ジャッジ日時 2024-04-20 02:06:52
合計ジャッジ時間 2,520 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
52,340 KB
testcase_01 AC 31 ms
52,552 KB
testcase_02 AC 42 ms
61,412 KB
testcase_03 AC 34 ms
52,640 KB
testcase_04 AC 34 ms
52,316 KB
testcase_05 AC 33 ms
52,132 KB
testcase_06 AC 34 ms
57,936 KB
testcase_07 AC 36 ms
58,556 KB
testcase_08 AC 46 ms
62,100 KB
testcase_09 AC 35 ms
58,680 KB
testcase_10 AC 37 ms
58,488 KB
testcase_11 AC 40 ms
59,240 KB
testcase_12 AC 39 ms
58,672 KB
testcase_13 AC 39 ms
58,188 KB
testcase_14 AC 57 ms
62,456 KB
testcase_15 AC 45 ms
58,072 KB
testcase_16 AC 42 ms
57,712 KB
testcase_17 AC 89 ms
63,060 KB
testcase_18 AC 54 ms
61,900 KB
testcase_19 AC 39 ms
58,188 KB
testcase_20 AC 38 ms
58,184 KB
testcase_21 AC 38 ms
58,048 KB
testcase_22 AC 132 ms
61,952 KB
testcase_23 AC 39 ms
58,788 KB
testcase_24 AC 40 ms
57,576 KB
testcase_25 AC 45 ms
60,440 KB
testcase_26 AC 39 ms
58,012 KB
testcase_27 AC 37 ms
58,452 KB
testcase_28 AC 37 ms
58,664 KB
testcase_29 AC 37 ms
57,760 KB
testcase_30 AC 39 ms
58,068 KB
testcase_31 AC 42 ms
58,808 KB
testcase_32 AC 40 ms
58,268 KB
testcase_33 AC 41 ms
59,020 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
maxAns = N - 1
minAns = 10**11
yaku = []
i = 1
while i * i <= N:
	if N % i == 0:
		yaku.append(i)
	i += 1
for a in yaku:
	for b in yaku:
		if N % (a * b) == 0:
			c = N // (a * b)
			minAns = min(minAns,a - 1 + b - 1 + c - 1)
print(minAns,maxAns)
0