Чисел из 10 цифр: 9 * 9 * 8 * 7 * 6 * 5 * 4 * 3 * 2 * 1 = 3'265'920
Macro Count(Value)
CountString(Num$, Value)
EndMacro
For a = 0 To 9999999999
Num$ = Str(a)
If Count("0") <= 1 And Count("1") <= 1 And Count("2") <= 1 And Count("3") <= 1 And Count("4") <= 1 And Count("5") <= 1 And Count("6") <= 1 And Count("7") <= 1 And Count("8") <= 1 And Count("9") <= 1
NumCount + 1
EndIf
Next
File = CreateFile(#PB_Any, "Количество всех чисел с неповторяющимися цифрами.txt")
WriteString(File, Str(NumCount))
NewList Num.d()
Macro Add(Value)
AddElement(Num())
Num() = Value
EndMacro
Macro Count(String)
(CountString(String, "0") <= 1 And CountString(String, "1") <= 1 And CountString(String, "2") <= 1 And CountString(String, "3") <= 1 And CountString(String, "4") <= 1 And CountString(String, "5") <= 1 And CountString(String, "6") <= 1 And CountString(String, "7") <= 1 And CountString(String, "8") <= 1 And CountString(String, "9") <= 1)
EndMacro
OpenConsole("")
NumberDB = CreateFile(#PB_Any, "Все числа (с плавающей запятой).bin")
CountFile = CreateFile(#PB_Any, "Количество чисел.txt")
Macro Write(Value)
WriteDouble(NumberDB, Value)
EndMacro
For a = -9876543210 To 9876543210
f1.d = a / 10
f2.d = a / 100
f3.d = a / 1000
f4.d = a / 10000
f5.d = a / 100000
f6.d = a / 1000000
f7.d = a / 10000000
f8.d = a / 100000000
f9.d = a / 1000000000
f10.d = a / 10000000000
i0 = #True
i1 = #True
i2 = #True
i3 = #True
i4 = #True
i5 = #True
i6 = #True
i7 = #True
i8 = #True
i9 = #True
i10 = #True
ForEach Num()
If Num() = a
i0 = #False
EndIf
If Num() = f1
i1 = #False
EndIf
If Num() = f2
i2 = #False
EndIf
If Num() = f3
i3 = #False
EndIf
If Num() = f4
i4 = #False
EndIf
If Num() = f5
i5 = #False
EndIf
If Num() = f6
i6 = #False
EndIf
If Num() = f7
i7 = #False
EndIf
If Num() = f8
i8 = #False
EndIf
If Num() = f9
i9 = #False
EndIf
If Num() = f10
i10 = #False
EndIf
Next
If i0
s0$ = StrD(a)
If Count(s0$)
Add(a)
PrintN(s0$)
Write(a)
EndIf
EndIf
If i1
s1$ = StrD(f1)
If Count(s1$)
Add(f1)
PrintN(s1$)
Write(f1)
EndIf
EndIf
If i2
s2$ = StrD(f2)
If Count(s2$)
Add(f2)
PrintN(s2$)
Write(f2)
EndIf
EndIf
If i3
s3$ = StrD(f3)
If Count(s3$)
Add(f3)
PrintN(s3$)
Write(f3)
EndIf
EndIf
If i4
s4$ = StrD(f4)
If Count(s4$)
Add(f4)
PrintN(s4$)
Write(f4)
EndIf
EndIf
If i5
s5$ = StrD(f5)
If Count(s5$)
Add(f5)
PrintN(s5$)
Write(f5)
EndIf
EndIf
If i6
s6$ = StrD(f6)
If Count(s6$)
Add(f6)
PrintN(s6$)
Write(f6)
EndIf
EndIf
If i7
s7$ = StrD(f7)
If Count(s7$)
Add(f7)
PrintN(s7$)
Write(f7)
EndIf
EndIf
If i8
s8$ = StrD(f8)
If Count(s8$)
Add(f8)
PrintN(s8$)
Write(f8)
EndIf
EndIf
If i9
s9$ = StrD(f9)
If Count(s9$)
Add(f9)
PrintN(s9$)
Write(f9)
EndIf
EndIf
If i10
s10$ = StrD(f10)
If Count(s10$)
Add(f10)
PrintN(s10$)
Write(f10)
EndIf
EndIf
Next
WriteString(CountFile, Str(ListSize(Num())))
Structure THREE
a.a
b.a
c.a
EndStructure
Image = CreateImage(#PB_Any, 4096, 4096, 24)
StartDrawing(ImageOutput(Image))
*Pixel.THREE = DrawingBuffer()
For a = 0 To 255
For b = 0 To 255
For c = 0 To 255
*Pixel\a = a
*Pixel\b = b
*Pixel\c = c
*Pixel + SizeOf(THREE)
Next
Next
Next
StopDrawing()
SaveImage(Image, Str(Pow(2,24))+".bmp")