結果
問題 | No.375 立方体のN等分 (1) |
ユーザー |
![]() |
提出日時 | 2023-01-05 00:16:37 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 4,797 ms / 5,000 ms |
コード長 | 278 bytes |
コンパイル時間 | 81 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-11-28 04:31:49 |
合計ジャッジ時間 | 11,964 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 32 |
ソースコード
x=int(input()) L=int(x**(1/2)) LIST=[] for i in range(1,L+1): if x%i==0: LIST.append(i) LIST.append(x//i) ANS=x for a in LIST: for b in LIST: if a*b<=x and x%(a*b)==0: k=x//(a*b) ANS=min(ANS,a+b+k-3) print(ANS,x-1)