/four-square

Primary LanguageJupyter Notebook

four-square

シリーズ名: 自分で作った課題 series: My own task

数学 Mathematics

四平方の定理 Lagrange's four-square theorem

すべての自然数は4つの平方数の和であらわすことができる。

code1 four-square.py
整数nを入力し、nの四平方定理の解を出力する。
Enter the integer n and output the solution of the n four-square theorem.

code2 four-square2.py
ゼロから整数nまでの連続した整数の四平方定理の解を出力する。
Give the solution of the continuous squared theta-square theorem from zero to the integer n.

code3 four-square3.py
code2の変形。
Transformation of code 2.

code4 four-square4.py
code1,2,3のロジックではNGとなった四平方定理の解を出力する。 The logic of code 1, 2 and 3 outputs the solution of the 4 square theorem which became NG.

[NB]MyOwnTask_Math(四平方定理).ipynb
このプログラムはテスト用です。
This program is for testing.