結果
問題 |
No.375 立方体のN等分 (1)
|
ユーザー |
![]() |
提出日時 | 2016-06-05 12:10:50 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 580 ms / 5,000 ms |
コード長 | 283 bytes |
コンパイル時間 | 81 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 20,608 KB |
最終ジャッジ日時 | 2024-10-11 21:03:22 |
合計ジャッジ時間 | 3,994 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 32 |
ソースコード
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)