Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[問題追加] gcd of gaussian integers #1028

Merged
merged 19 commits into from
Nov 21, 2023
4 changes: 2 additions & 2 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]$, $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$.
- 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$.

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\wedge 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$ であることとと $z\mid x$ かつ $z\mid y$ であることが同値になることをいう.このような $g$ は,$\pm 1$, $\pm i$ 倍の不定性を除き一意に定まる.
maspypy marked this conversation as resolved.
Show resolved Hide resolved

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

Expand Down