結果
問題 |
No.376 立方体のN等分 (2)
|
ユーザー |
![]() |
提出日時 | 2016-06-06 12:27:49 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 262 bytes |
コンパイル時間 | 331 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 99,616 KB |
最終ジャッジ日時 | 2024-10-08 16:27:49 |
合計ジャッジ時間 | 16,042 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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] m = float('inf') for (a,b) in [(i,j) for i in y if i**3 <=n for j in y+x \ if j >= i and n%(i*j) == 0 and i*j*j <= n]: m = min(a+b+n//(a*b)-3, m) print(m,n-1)