Problem 44399. 二乗になっている数を見つけよう

ある数のベクトルが与えられた場合、そのベクトルの要素の一つが他の要素の二乗であれば true を返し、それ以外の場合は false を返すようなコードを書いてみましょう。

例:

 入力が  a = [2 3 4] のとき、
 出力 b は true になります。
 2の2乗は4であり、ベクトル内に2と4の両方が含まれているため、出力は true になります。

Solution Stats

60.5% Correct | 39.5% Incorrect
Last Solution submitted on Mar 12, 2024

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers298

Suggested Problems

More from this Author12

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!