Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
28
Task/ABC-problem/Gambas/abc-problem.gambas
Normal file
28
Task/ABC-problem/Gambas/abc-problem.gambas
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
Public Sub Main()
|
||||
Dim sCheck As String[] = ["A", "BARK", "BOOK", "TREAT", "COMMON", "SQUAD", "CONFUSE"]
|
||||
Dim sBlock As String[] = ["BO", "XK", "DQ", "CP", "NA", "GT", "RE", "TG", "QD", "FS", "JW", "HU", "VI", "AN", "OB", "ER", "FS", "LY", "PC", "ZM"]
|
||||
Dim sList As New String[]
|
||||
Dim siCount, siLoop As Short
|
||||
Dim sTemp, sAnswer As String
|
||||
|
||||
For Each sTemp In sCheck
|
||||
sAnswer = ""
|
||||
sList = sBlock.Copy()
|
||||
For siCount = 1 To Len(sTemp)
|
||||
For siLoop = 0 To sList.Max
|
||||
If InStr(sList[siLoop], Mid(sTemp, siCount, 1)) Then
|
||||
sList.Extract(siLoop, 1)
|
||||
sAnswer &= Mid(sTemp, siCount, 1)
|
||||
Break
|
||||
Endif
|
||||
Next
|
||||
Next
|
||||
|
||||
If sAnswer = sTemp Then
|
||||
Print sTemp & " - True"
|
||||
Else
|
||||
Print sTemp & " - False"
|
||||
End If
|
||||
Next
|
||||
|
||||
End
|
||||
Loading…
Add table
Add a link
Reference in a new issue