結果
| 問題 | No.376 立方体のN等分 (2) |
| コンテスト | |
| ユーザー |
compass19
|
| 提出日時 | 2016-06-05 12:11:27 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
TLE
不安定
|
| 実行時間 | - |
| コード長 | 283 bytes |
| 記録 | |
| コンパイル時間 | 55 ms |
| コンパイル使用メモリ | 15,104 KB |
| 実行使用メモリ | 109,312 KB |
| 最終ジャッジ日時 | 2026-09-12 03:38:55 |
| 合計ジャッジ時間 | 50,700 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 33 TLE * 5 |
ソースコード
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
m = float('inf')
for (a,b) in [(i,j) for i in y if i**3 <=n for j in y if j >= i and n%(i*j) == 0 and i*j*j <= n]:
if a+b+n//(a*b) -3 < m:
m = a+b+n//(a*b) -3
print(m,n-1)
compass19