Skip to content

Commit

Permalink
upd task.md
Browse files Browse the repository at this point in the history
  • Loading branch information
maspypy committed Sep 21, 2023
1 parent e6c0311 commit b161ad2
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions math/gcd_of_gaussian_integers/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Please refer to the following definitions for Gaussian integers and their greate

- For $x, y \in \mathbb{Z}[i]$, we define $x\mid y$ if there exists a $z$ in $\mathbb{Z}[i]$ such that $y = xz$.

- A Gaussian integer $g$ is a greatest common divisor of $x, y\in \mathbb{Z}[i]$ if, for any $z$ in $\mathbb{Z}[i]$, the condition $z\mid g$ is equivalent to $z\mid x$ and $z\mid y$. Such a $g$ is uniquely determined except for multiples of $\pm 1$ and $\pm i$.
- A Gaussian integer $g$ is a greatest common divisor of $x, y\in \mathbb{Z}[i]$ if, for any $z$ in $\mathbb{Z}[i]$, $z\mid g \iff z\mid x\wedge z \mid y$ holds. Such a $g$ is uniquely determined except for multiples of $\pm 1$ and $\pm i$.

You have $T$ test cases to solve.

Expand All @@ -24,7 +24,7 @@ Gauss 整数やその最大公約数については以下の定義を参考に

- $\mathbb{Z}[i] = \lbrace a+bi\mid a,b\in \mathbb{Z} \rbrace$ の元を Gauss 整数という.
- $x,y \in \mathbb{Z}[i]$ に対し,$y=xz$ となる $z \in \mathbb{Z}[i]$ が存在するとき $x\mid y$ であると定義する.
- $g \in \mathbb{Z}[i]$ が $x,y \in \mathbb{Z}[i]$ の最大公約数であるとは,任意の $z\in \mathbb{Z}[i]$ に対して $z\mid g \iff z\mid x \text{かつ} z\mid y$ が成り立つことをいう.このような $g$ は,$\pm 1$, $\pm i$ 倍の不定性を除き一意に定まる.
- $g \in \mathbb{Z}[i]$ が $x,y \in \mathbb{Z}[i]$ の最大公約数であるとは,任意の $z\in \mathbb{Z}[i]$ に対して$z\mid g \iff z\mid x\wedge z \mid y$ が成り立つことをいう.このような $g$ は,$\pm 1$, $\pm i$ 倍の不定性を除き一意に定まる.

$T$ 個のテストケースが与えられるので,それぞれについて答えを求めてください.

Expand All @@ -44,8 +44,12 @@ $a_1$ $b_1$ $a_2$ $b_2$
```

## @{keyword.output}

@{lang.ja}
$a_1+b_1i$ と $a_2+b_2i$ の最大公約数が $a+bi$ であるとき,$a, b$ を出力してください.
@{lang.en}
When $a+bi$ is a greatest common divisor of $a_1+b_1i$ and $a_2+b_2i$, output $a$ and $b$.
@{lang.end}

```
$a$ $b$
```
Expand Down

0 comments on commit b161ad2

Please sign in to comment.