Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
33
Task/Look-and-say-sequence/FOCAL/look-and-say-sequence.focal
Normal file
33
Task/Look-and-say-sequence/FOCAL/look-and-say-sequence.focal
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
01.10 A "HOW MANY",M
|
||||
01.20 S B(0)=1;S B(1)=0
|
||||
01.30 F Z=1,M;D 4;D 2
|
||||
01.40 Q
|
||||
|
||||
02.10 S X=0;S Y=0
|
||||
02.15 I (B(X)),2.5
|
||||
02.17 S CN=0
|
||||
02.20 S CN=CN+1
|
||||
02.25 S X=X+1
|
||||
02.30 I (FABS(B(X)-B(X-1))),2.2
|
||||
02.35 S C(Y)=CN;S C(Y+1)=B(X-1)
|
||||
02.40 S Y=Y+2
|
||||
02.45 G 2.15
|
||||
02.50 S C(Y)=0
|
||||
02.55 F X=0,Y;S B(X)=C(X)
|
||||
|
||||
03.10 I (A-9)3.2;T "9";R
|
||||
03.20 I (A-8)3.3;T "8";R
|
||||
03.30 I (A-7)3.4;T "7";R
|
||||
03.40 I (A-6)3.5;T "6";R
|
||||
03.50 I (A-5)3.6;T "5";R
|
||||
03.60 I (A-4)3.7;T "4";R
|
||||
03.70 I (A-3)3.8;T "3";R
|
||||
03.80 I (A-2)3.9;T "2";R
|
||||
03.90 T "1"
|
||||
|
||||
04.10 S X=0
|
||||
04.20 S A=B(X)
|
||||
04.30 I (-A)4.4;T !;R
|
||||
04.40 D 3
|
||||
04.50 S X=X+1
|
||||
04.60 G 4.2
|
||||
Loading…
Add table
Add a link
Reference in a new issue