Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,12 +0,0 @@
|
|||
function Test-SelfDescribing ([int]$Number)
|
||||
{
|
||||
[int[]]$digits = $Number.ToString().ToCharArray() | ForEach-Object {[Char]::GetNumericValue($_)}
|
||||
[int]$sum = 0
|
||||
|
||||
for ($i = 0; $i -lt $digits.Count; $i++)
|
||||
{
|
||||
$sum += $i * $digits[$i]
|
||||
}
|
||||
|
||||
$sum -eq $digits.Count
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
Test-SelfDescribing -Number 2020
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
11,2020,21200,321100 | ForEach-Object {
|
||||
[PSCustomObject]@{
|
||||
Number = $_
|
||||
IsSelfDescribing = Test-SelfDescribing -Number $_
|
||||
}
|
||||
} | Format-Table -AutoSize
|
||||
Loading…
Add table
Add a link
Reference in a new issue