Lua 5.4.4, 99 bytes
_=0s:gsub('.',function(c)_=({d=_-1,i=_+1;s=_*_})[c]or print(_)or _ _=({[256]=0,[-1]=0})[_]or _ end)
Try it online!
Thanks to @orthoplex for more shortening.
Lua 5.4, 3 unique characters
#'#'/#'##'
Try it online!
[...] scoring is done in terms of number of unique characters used in the submission.
Hashtag #
Single quote '
Slash /
Lua 5.4.4, 147 bytes
local function f()goto l::l::return end for _ in f do end if true and false then elseif""then else end repeat until""or not nil while""do break end
Try it online!
Check th...
C (gcc), 59 bytes
i;f(m,n){while(i<m*n){putchar(i%n?32:13);putchar(48+i++);}}
Attempt This Online!
m is the number of rows.
n is the number of columns.
Lua 5.4, 9 bytes
n^.5%1==0
Try it online!
The entire compressed code is 33 bytes:
function f(n)return n^.5%1==0 end
Try it here.
It's not clear whether the rules allow the first form (i...
C (gcc), 37 bytes
f(n,p){while(++p*p<n);return p*p==n;}
Try it online!
The solution is based on the simple fact that:
$$\forall n \in \mathbb{N}, n \text{ is a perfect square} \Longleftrig...