crypto 0.1.0

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
program coder;
{var lib:array[1..242]of string;
libbytes:array[1..242]of string;
libnames:array[1..242]of string;
ls:array[1..11]of string;
lss:array[1..2]of string;}
begin
var kj:array [,] of integer;
var ki:array [,] of integer;
var h := new System.IO.StreamReader('input.txt', System.Text.Encoding.Default);
var text,liba:string;
var n:integer;
var sc:=0;
text:=h.ReadLine;
n:=length(text);
h.Close;
kj := new integer[n,3];
ki := new integer[n,3];
for var i:=0 to n-1 do begin
for var j:=0 to 2 do begin
sc:=sc+1;
kj[i,j]:=random(7)+1;
for var u:=1 to 100 do begin
for var m:=0 to 2 do begin
if j<>m then begin
if kj[i,j]=kj[i,m] then kj[i,j]:=random(7)+1;
if kj[i,m]=1 then begin
if kj[i,j]=2 then kj[i,j]:=random(7)+1;
end;
if kj[i,m]=7 then begin
if kj[i,j]=6 then kj[i,j]:=random(7)+1;
end;
if kj[i,m]-1>0 then begin
if kj[i,m]+1<7 then begin
if kj[i,j]=(kj[i,m]-1) then kj[i,j]:=random(7)+1;
if kj[i,j]=(kj[i,m]+1) then kj[i,j]:=random(7)+1;
end;
end;
end;
end;
end;
if random(2)=0 then begin
if kj[i,j]>1 then ki[i,j]:=kj[i,j]-1;
if kj[i,j]=1 then ki[i,j]:=kj[i,j]+1;
end;
if random(2)=1 then begin
if kj[i,j]<7 then ki[i,j]:=kj[i,j]+1;
if kj[i,j]=7 then ki[i,j]:=kj[i,j]-1;
end;
// test writeln('kj:',kj[i,j],' / ki:',ki[i,j],' / num:',sc);
end;
end;
//writeln(n,' all right');
//шифруем теперь.
var p:array of string;
var pe:array of string;
var packs:array of string;
var simb:array of string;
var lib:array of string;
var simbt:array of string;
var l := new System.IO.StreamReader('input.txt', System.Text.Encoding.Default);
liba:=l.ReadLine;
var g:=length(liba);
end.