Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
28
Task/Rep-string/Phixmonti/rep-string.phixmonti
Normal file
28
Task/Rep-string/Phixmonti/rep-string.phixmonti
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
include ..\Utilitys.pmt
|
||||
|
||||
def repstr /# s n -- s #/
|
||||
"" swap
|
||||
for drop
|
||||
over chain
|
||||
endfor
|
||||
nip
|
||||
enddef
|
||||
|
||||
|
||||
def repString /# s -- s #/
|
||||
len dup var sz
|
||||
2 / 1 swap 2 tolist for
|
||||
var i
|
||||
1 i slice var chunk
|
||||
chunk sz i / 1 + repstr
|
||||
1 sz slice nip over
|
||||
== if chunk exitfor endif
|
||||
endfor
|
||||
len sz == sz 1 == or if ": No repeat string" chain else ": " swap chain chain endif
|
||||
enddef
|
||||
|
||||
( "1001110011" "1110111011" "0010010010" "1010101010" "1111111111" "0100101101" "0100100" "101" "11" "00" "1" )
|
||||
|
||||
len for
|
||||
get repString print nl
|
||||
endfor
|
||||
Loading…
Add table
Add a link
Reference in a new issue