Comments on Getting perfect squares, differently
Post
Getting perfect squares, differently
Create a program that gets all perfect squares starting from 0 or 1 without using any methods of multiplication (repetitive addition) and exponentiation (repetitive multiplication). Output them for validation.
Things such as built-ins/functions related to these unusable methods can't be used either. pow(x,y) and x**y are examples of these unusable methods.
A simple, yet tricky activity! Being code-golf, the shortest program in each programming language wins!
JavaScript (V8), 28 bytes …
5y ago
Japt, 9 bytes No infinite l …
5y ago
[Husk], 3 bytes ∫İ1 …
5y ago
Perl, 20 bytes Counts up fr …
6mo ago
[PHP], 57 bytes <?p …
5y ago
[Lua], 41 40 bytes …
5y ago
[Python 3], 34 bytes …
5y ago
[C (clang)], 47 45 43 bytes …
5y ago

2 comment threads