業界トップクラスの求人数を誇る転職エージェントPR

リクルートグループのコネクションを活かした非公開求人も充実、他にはない好条件の求人と出会える

0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

OMC215A(190,代数)

Last updated at Posted at 2025-01-27

$f(x)=x^2-1001x+1001^2$とします。
変形して、
$f(x)=1001^2-x(1001-x)$
と置くことができ、$1≦x≦1000$のどの値でも$x<1001,1001-x<1001$なので、$f(x)>0$が言えます。

$f(x)>0$かつ$\frac{a^2-1001a+1001^2}{b^2-1001b+1001^2}=\frac{f(a)}{f(b)}$なので、$f(a)$が最大、$f(b)$が最小になるときが最大になります。

$f(x)$は下に凸の$2$次関数で、平方完成すると
$f(x)=(x-\frac{1001}{2})^2+C$ $(C$は定数$)$
です。
$x=\frac{1001}{2}$のとき、$f(x)$が最下点になり、$1<\frac{1001}{2}<1000$です。
また、$500<\frac{1001}{2}<501$です。

したがって、$f(x)$か最大になるのは$x=1,1000$のどちらか、または両方、最小になるのは$x=500,501$のどちらか、または両方です。

$f(1)=1^2-1001×1×1001^2$
$=1001^2-(1001-1)×1$
$=1001^2-1000$

$f(1000)=1000^2-1001×1000+1001^2$
$=1001^2-(1001-1000)×1000$
$=1001^2-1000$

$f(500)=500^2-1001×500+1001^2$
$=1001^2-(1001-500)×500$
$=1001^2-500×501$

$f(501)=501^2-1001×501+1001^2$
$=1001^2-(1001-501)×501$
$=1001^2-500×501$

$f(1)=f(1000),f(500)=f(501)$となるので、$(a,b)=\lbrace(1,500),(1,501),(1000,500),(1000,501)\rbrace$になります。
したがって、
$(1+1000)×2+(500+501)×2$
$=4004$
が解になります。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up

Qiita Conference 2025 will be held!: 4/23(wed) - 4/25(Fri)

Qiita Conference is the largest tech conference in Qiita!

Keynote Speaker

ymrl、Masanobu Naruse, Takeshi Kano, Junichi Ito, uhyo, Hiroshi Tokumaru, MinoDriven, Minorun, Hiroyuki Sakuraba, tenntenn, drken, konifar

View event details
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?