7 kyu

You're a square!

1,898 of 284,544bkaes

Description:

A square of squares

You like building blocks. You especially like building blocks that are squares. And what you even like more, is to arrange them into a square of square building blocks!

However, sometimes, you can't arrange them into a square. Instead, you end up with an ordinary rectangle! Those blasted things! If you just had a way to know, whether you're currently working in vain… Wait! That's it! You just have to check if your number of building blocks is a perfect square.

Task

Given an integral number, determine if it's a square number:

In mathematics, a square number or perfect square is an integer that is the square of an integer; in other words, it is the product of some integer with itself.

The tests will always use some integral number, so don't worry about that in dynamic typed languages.

Examples

-1  =>  false
 0  =>  true
 3  =>  false
 4  =>  true
25  =>  true
26  =>  false
Fundamentals
Mathematics

Stats:

CreatedJan 23, 2015
PublishedJan 23, 2015
Warriors Trained477889
Total Skips43818
Total Code Submissions864987
Total Times Completed284544
Haskell Completions1898
JavaScript Completions106123
Ruby Completions7078
CoffeeScript Completions295
Python Completions88593
Java Completions33171
C# Completions20488
Dart Completions1601
TypeScript Completions5166
C++ Completions15161
Scala Completions972
C Completions6214
Julia Completions179
Elixir Completions354
CommonLisp Completions249
COBOL Completions34
R Completions264
Crystal Completions23
PHP Completions1889
Rust Completions1580
Lua Completions270
D Completions18
F# Completions46
λ Calculus Completions7
Groovy Completions5
Total Stars2370
% of votes with a positive feedback rating88% of 22353
Total "Very Satisfied" Votes17445
Total "Somewhat Satisfied" Votes4424
Total "Not Satisfied" Votes484
Ad
Contributors
  • bkaes Avatar
  • jhoffner Avatar
  • spencerwi Avatar
  • user146871 Avatar
  • Unnamed Avatar
  • Jotha Avatar
  • Unihedron Avatar
  • lessonteacher Avatar
  • aweleshetu Avatar
  • Chrono79 Avatar
  • kazk Avatar
  • docgunthrop Avatar
  • JohanWiltink Avatar
  • mvargeson Avatar
  • Blind4Basics Avatar
  • Voile Avatar
  • Souzooka Avatar
  • rowcased Avatar
  • fredc Avatar
  • hobovsky Avatar
  • stellartux Avatar
  • user8436785 Avatar
  • ejini战神 Avatar
  • akar-0 Avatar
  • Kacarott Avatar
  • uninhm Avatar
  • FranzMartyn Avatar
  • fcr-- Avatar
Ad