Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,24 @@
|
|||
Dim PList as QStringList
|
||||
PList.addItems "ABCD", "CABD", "ACDB", "DACB", "BCDA", "ACBD", "ADCB", "CDAB"
|
||||
PList.additems "DABC", "BCAD", "CADB", "CDBA", "CBAD", "ABDC", "ADBC", "BDCA"
|
||||
PList.additems "DCBA", "BACD", "BADC", "BDAC", "CBDA", "DBCA", "DCAB"
|
||||
|
||||
Dim NumChar(4, 65 to 68) as integer
|
||||
Dim MPerm as string
|
||||
|
||||
'Create table with occurences
|
||||
For x = 0 to PList.Itemcount -1
|
||||
for y = 1 to 4
|
||||
Inc(NumChar(y, asc(PList.Item(x)[y])))
|
||||
next
|
||||
next
|
||||
|
||||
'When a char only occurs 5 times it's the missing one
|
||||
for x = 1 to 4
|
||||
for y = 65 to 68
|
||||
MPerm = MPerm + iif(NumChar(x, y)=5, chr$(y), "")
|
||||
next
|
||||
next
|
||||
|
||||
showmessage MPerm
|
||||
'= DBAC
|
||||
Loading…
Add table
Add a link
Reference in a new issue