結果
| 問題 | No.376 立方体のN等分 (2) |
| コンテスト | |
| ユーザー |
compass19
|
| 提出日時 | 2016-06-05 12:11:27 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 283 bytes |
| 記録 | |
| コンパイル時間 | 200 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 17,152 KB |
| 最終ジャッジ日時 | 2024-10-08 15:28:00 |
| 合計ジャッジ時間 | 14,945 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 14 TLE * 1 -- * 23 |
ソースコード
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