How to resolve the algorithm Super-d numbers step by step in the zkl programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm Super-d numbers step by step in the zkl programming language
Table of Contents
Problem Statement
A super-d number is a positive, decimal (base ten) integer n such that d × nd has at least d consecutive digits d where For instance, 753 is a super-3 number because 3 × 7533 = 1280873331.
Super-d numbers are also shown on MathWorld™ as super-d or super-d.
Let's start with the solution:
Step by Step solution about How to resolve the algorithm Super-d numbers step by step in the zkl programming language
Source code in the zkl programming language
var [const] BI=Import("zklBigNum"); // libGMP
fcn superDW(d){
digits:=d.toString()*d;
[2..].tweak('wrap(n)
{ BI(n).pow(d).mul(d).toString().holds(digits) and n or Void.Skip });
}
foreach d in ([2..8]){ println(d," : ",superDW(d).walk(10).concat(" ")) }
You may also check:How to resolve the algorithm Sparkline in unicode step by step in the Clojure programming language
You may also check:How to resolve the algorithm Munchausen numbers step by step in the ALGOL W programming language
You may also check:How to resolve the algorithm String interpolation (included) step by step in the Erlang programming language
You may also check:How to resolve the algorithm Xiaolin Wu's line algorithm step by step in the Icon programming language
You may also check:How to resolve the algorithm Sum of a series step by step in the SQL programming language