Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
24
Task/ABC-problem/BaCon/abc-problem.bacon
Normal file
24
Task/ABC-problem/BaCon/abc-problem.bacon
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
CONST info$ = "BO XK DQ CP NA GT RE TG QD FS JW HU VI AN OB ER FS LY PC ZM"
|
||||
|
||||
DATA "A", "BARK", "BOOK", "TREAT", "Common", "Squad", "Confuse"
|
||||
|
||||
WHILE TRUE
|
||||
READ word$
|
||||
|
||||
IF NOT(LEN(word$)) THEN BREAK
|
||||
|
||||
block$ = info$
|
||||
|
||||
count = AMOUNT(block$)
|
||||
|
||||
FOR y = 1 TO LEN(word$)
|
||||
FOR x = 1 TO AMOUNT(block$)
|
||||
IF TALLY(TOKEN$(block$, x), MID$(UCASE$(word$), y, 1)) THEN
|
||||
block$ = DEL$(block$, x)
|
||||
BREAK
|
||||
END IF
|
||||
NEXT
|
||||
NEXT
|
||||
|
||||
PRINT word$, IIF$(LEN(word$) = count-AMOUNT(block$), "True", "False") FORMAT "%-10s: %s\n"
|
||||
WEND
|
||||
Loading…
Add table
Add a link
Reference in a new issue