Data update
This commit is contained in:
parent
35bcdeebf8
commit
74c69a0df6
2427 changed files with 31826 additions and 3468 deletions
17
Task/Rep-string/SETL/rep-string.setl
Normal file
17
Task/Rep-string/SETL/rep-string.setl
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
program repstring;
|
||||
tests := [
|
||||
"1001110011", "1110111011", "0010010010", "1010101010",
|
||||
"1111111111", "0100101101", "0100100", "101", "11", "00", "1"
|
||||
];
|
||||
|
||||
loop for test in tests do
|
||||
print(test + ": " + str repstrings(test));
|
||||
end loop;
|
||||
|
||||
proc repstrings(s);
|
||||
return {
|
||||
s(..l) : l in [1..#s div 2]
|
||||
| (s(..l)*(#s div l+1))(..#s) = s
|
||||
};
|
||||
end proc;
|
||||
end program;
|
||||
Loading…
Add table
Add a link
Reference in a new issue