> FOR i=1 TO 3
> PRINT #1:i;
> PRINT #1:X;
> FOR j=1 TO 4
> PRINT #1:A(I,J);
> NEXT j
> PRINT
> NEXT i
>
> 上のプログラムを実行すると、
>
> 1,100,5,3,6,8
> 2,300,6,1,6,9
> 3,500,9,1,2,8
>
> といった形で出力されます。
>
> これを内部形式ファイルへの出力におけるWRITE文でも同じように出力することは可能でしょうか?
以下のようなことでよろしいのでしょうか?
DIM A(3,4),X(3)
MAT READ A
DATA 5,3,6,8
DATA 6,1,6,9
DATA 9,1,2,8
MAT READ X
DATA 100,300,500
OPEN #1:NAME "sample.txt",RECTYPE INTERNAL
ERASE #1
FOR I=1 TO 3
WRITE #1:I,
WRITE #1:X(I),
FOR J=1 TO 3
WRITE #1:A(I,J),
NEXT J
WRITE #1:A(I,4)
NEXT I
CLOSE #1
END
> 以下のようなことでよろしいのでしょうか?
>
> DIM A(3,4),X(3)
> MAT READ A
> DATA 5,3,6,8
> DATA 6,1,6,9
> DATA 9,1,2,8
> MAT READ X
> DATA 100,300,500
> OPEN #1:NAME "sample.txt",RECTYPE INTERNAL
> ERASE #1
> FOR I=1 TO 3
> WRITE #1:I,
> WRITE #1:X(I),
> FOR J=1 TO 3
> WRITE #1:A(I,J),
> NEXT J
> WRITE #1:A(I,4)
> NEXT I
> CLOSE #1
> END
>
!Sieve of Sundaram サンダラムの篩(ふるい)
OPTION ARITHMETIC NATIVE !2進モード
LET t0=TIME
OPEN #1:NAME "prime_1xv.txt",RECTYPE INTERNAL
ERASE #1
WRITE #1:2
LET N=500000-1
DIM L(N)
LET D=4
LET S=3
DO
FOR I=D TO N STEP S
LET L(I)=1
NEXT I
LET D=D+3
LET S=S+2
LOOP UNTIL D>(N/30)
FOR I=1 TO N
IF L(I)=0 THEN
LET Z=2*I+1
WRITE #1:z
END IF
NEXT I
PRINT TIME-t0;"秒で計算しました"
END
OPTION ARITHMETIC NATIVE !2進モード
LET t0=TIME
! PRINT 2
LET M=1600000000-1000 !素数 最小値
LET N=1600000000 !素数 最大値
DIM A(M TO N)
MAT A=ZER
LET S=3
LET D=4
LET k=N/30
DO
LET B=D+S*INT((M-D)/S) !ここが改良のポイント
DO UNTIL B>=M
LET B=B+S
LOOP
FOR I=B TO N STEP S
LET A(I)=1
NEXT I
LET S=S+2
LET D=D+3
LOOP UNTIL D>k
FOR I=M TO N
IF A(I)=0 THEN PRINT I*2+1
NEXT I
PRINT TIME-t0;"秒で計算しました"
END
! 素数生成program 初代
OPTION ARITHMETIC NATIVE
LET t0=TIME
!PRINT 2
FOR n=3999998029 TO 3999999979 STEP 2
FOR i=3 TO SQR(n) STEP 2
IF MOD(n,i)=0 THEN GOTO 100
NEXT i
PRINT n
100 NEXT n
PRINT TIME-t0;"秒で計算しました"
END
LET M=2000000000-1000 !素数 最小値
LET N=2000000000 !素数 最大値
LET k=N/30
3999999979 (98個)
16.3300000000017 秒で計算しました
LET k=N/60
3999999979
8.44999999999709 秒で計算しました
LET k=N/120
3999999979
4.66999999999825 秒で計算しました
LET k=N/240
3999999979
2.66000000000349 秒で計算しました
LET k=N/480
3999999979
1.75 秒で計算しました
LET k=N/960
3999999979
1.22000000000116 秒で計算しました
LET k=N/1920
3999999979
.849999999998545 秒で計算しました
LET k=N/3840
3999999979
.810000000004948 秒で計算しました
LET k=N/7680
3999999979
.659999999996217 秒で計算しました
LET k=N/15360
3999999979 (98個)
.630000000004657 秒で計算しました
----------------------------------------誤差が出ました。
LET k=N/30720
3999999979 107個
.760000000009313 秒で計算しました
AMD Athion 64 3800+(2.4GHz)使用期間は10年超えました。
------------------------------------------------------
OPTION ARITHMETIC NATIVE !2進モード
LET t0=TIME
! PRINT 2
LET M=2000000000-1000 !素数 最小値
LET N=2000000000 !素数 最大値
DIM A(M TO N)
MAT A=ZER
LET S=3
LET D=4
LET k=N/15360 !計算量は不明
DO
LET B=D+S*INT((M-D)/S) !ここが改良のポイント
!PRINT b
DO UNTIL B>=M
LET B=B+S
LOOP
FOR I=B TO N STEP S
LET A(I)=1
NEXT I
LET S=S+2
LET D=D+3
LOOP UNTIL D>k
FOR I=M TO N
IF A(I)=0 THEN PRINT I*2+1
NEXT I
PRINT TIME-t0;"秒で計算しました"
END
------------------------------------------------
自身で書きましたが、なぜ? これが、素数なのか? わかりません。
自分でわかりやすく書きました。
----------------------------------------
!サンダラムの篩 最新版
OPTION ARITHMETIC NATIVE !2進モード
LET t0=TIME
OPEN #1:NAME "prime_10_7xv.txt",RECTYPE INTERNAL
ERASE #1
WRITE #1:2
LET L=5*10^7
DIM P(L)
MAT P=ZER ! すべての要素に0を代入
LET b=1
FOR a=3 TO L/7 STEP 2
FOR N=1 TO L STEP 1
LET z=a*n+b
IF Z>L THEN GOTO 100
LET P(z)=1
NEXT n
100 LET b=b+1
NEXT a
PRINT TIME-t0;"秒で計算完了"
LET c=1
FOR n=1 TO L-1
IF P(n)=0 THEN
LET z=n*2+1
WRITE #1:z
LET C=C+1
END IF
NEXT n
PRINT "素数";c;"個"
PRINT TIME-t0;"秒でファイル出力完了"
END
--------------------------------------------------
昨夜書いたばかりです。
次の問題は
LET N=2000000000 !素数 最大値
配列の限界が超えられません。
指数を使った場合は、どの様になるのか? わかりません。
先のプログラムで教わった。
LET Bをプリントすると奇数に限らず出てます。
だからと言って、略式 FOR n=2 TO x STEP 2 A(n)=1 で篩うと 失敗ですね。
合成数だから、滅茶苦茶篩えばみたいに思えます。
ここまででしょうか?
日本語が下手で申し訳ありません。
-----------------------------------------------
! "10の";r+4;"乗までの1千個の整数の中の素数の個数とリストを出力する
OPTION ARITHMETIC RATIONAL !有理数モード
DECLARE FUNCTION ISPRIME
FOR r=100-4 TO 101-4
LET t0=TIME
LET m=(10^r)-1
LET L=m*10000
DIM s(10000)
DIM p(5000)
MAT s=ZER
MAT p=ZER
FOR j=m*10000+1 TO m*10000+10000
IF ISPRIME(j)=0 THEN LET s(J-L)=1 !差し引く数
NEXT j
LET k=1
FOR i=1 TO 10000
IF s(i)=0 THEN
LET p(k)=L+i !ここで数合わせ
LET k=k+1
END IF
NEXT i
LET k0=k-1
PRINT "10の";r+4;"乗までの1万個の整数の中の擬素数の個数は"; k0;"個。計算時間は"; TIME-t0;"秒"
FOR kk=1TO k0
PRINT p(kk);
NEXT kk
PRINT
NEXT r
END
EXTERNAL FUNCTION ISPRIME(N)
OPTION ARITHMETIC RATIONAL !有理数モード
! OPTION ARITHMETIC DECIMAL_HIGH !1000桁モード
IF N = 2 THEN
LET ISPRIME=1
EXIT FUNCTION
END IF
IF N = 1 OR MOD(N , 2) = 0 THEN
LET ISPRIME=0
EXIT FUNCTION
END IF
LET D = (N - 1) / 2
LET S = 0
DO WHILE MOD(D , 2) = 0
LET D = INT(D / 2)
LET S=S+1
LOOP
FOR I=1 TO 10
LET ISP=0
READ A !' n < 341550071728321 なら a = 2, 3, 5, 7, 11, 13, 17
DATA 2,3,5,7,11,13,17,23,29,31
LET ISP = 0
LET R = POWMOD(A, D, N)
IF R = 1 OR R = N - 1 THEN
LET ISP = 1
END IF
LET R = POWMOD(R, 2, N)
FOR J = 0 TO S-1
IF R = N - 1 THEN
LET ISP = 1
END IF
LET R = POWMOD(R, 2, N)
NEXT J
IF ISP=0 THEN
LET ISPRIME=0
EXIT FUNCTION
END IF
NEXT I
LET ISPRIME=1
END FUNCTION
EXTERNAL FUNCTION POWMOD(B,P,M)
OPTION ARITHMETIC RATIONAL !有理数モード
! OPTION ARITHMETIC DECIMAL_HIGH !1000桁モード
LET RESULT = 1
DO WHILE P > 0
IF MOD(P , 2)= 1 THEN
LET RESULT = MOD(RESULT * B , M)
END IF
LET B = MOD(B * B, M)
LET P = INT(P / 2)
LOOP
LET POWMOD=RESULT
END FUNCTION
OPTION ARITHMETIC NATIVE !2進モード
LET t0=TIME
! PRINT 2
LET M=40000000000-1000 !素数 最小値
LET N=40000000000 !素数 最大値
LET r=M-90000 !DIM 限界から差し引く数
LET MM=40000000000-1000-r
LET NN=40000000000-r
DIM A(MM TO NN)
MAT A=ZER
LET S=3
LET D=4
LET k=N/61440 !計算量は不明
DO
LET B=D+S*INT((M-D)/S) !ここが改良のポイント
!PRINT b
DO UNTIL B>=M
LET B=B+S
LOOP
FOR I=B TO N STEP S
! PRINT b;d;s;I
LET II=I-r
LET A(II)=1
NEXT I
LET S=S+2
LET D=D+3
LET B=B+2
LOOP UNTIL D>k
FOR I=MM TO NN
IF A(I)=0 THEN PRINT (I+r)*2+1
NEXT I
PRINT TIME-t0;"秒で計算しました"
END
OPTION ARITHMETIC NATIVE
OPTION BASE 0
LET N=1000000000001 !'3以上の奇数のみ
LET M=N+1000 !'3以上の奇数のみ
DIM X(INT(1/2*(M-N)/32)+1)
FOR I=3 TO SQR(M) STEP 2
IF MOD(N,I)=0 THEN
LET P=N
ELSE
LET P=INT(N/I+1)*I !'N以上の最小のIの倍数
END IF
LET NN=(N-1)/2
IF N<=I THEN
LET PP=(P-1)/2
LET L=INT((PP-NN)/32)
LET K=MOD((PP-NN),32)
IF BITAND(X(L),2^K)=0 THEN LET P=P+I
END IF
FOR J=P TO M STEP I
IF MOD(J,2)=1 THEN !'奇数のみ
LET JJ=(J-1)/2
LET L=INT((JJ-NN)/32)
LET K=MOD((JJ-NN),32)
LET X(L)=BITOR(X(L),2^K) !'印をつける
END IF
NEXT J
NEXT I
FOR J=N TO M STEP 2
LET JJ=(J-1)/2
LET L=INT((JJ-NN)/32)
LET K=MOD((JJ-NN),32)
IF BITAND(X(L),2^K)=0 THEN PRINT J
NEXT J
END
LET L=10^8/2 !計算結果は2倍の数値になります。
DIM P(L)
LET b=1
LET k=0.7
FOR a=3 TO INT(L*k) STEP 2
LET f=f+1
FOR N=1 TO f STEP 1
LET z=a*n+b
! PRINT STR$(z)&","
IF Z>L THEN GOTO 100
LET P(z)=1
NEXT n
100 LET b=b+1
! PRINT "a=";a;"b=";b-1
NEXT a
FOR i=1 TO L-1
IF P(i)=0 THEN
LET z=I*2+1
WRITE #1:z
END IF
!PRINT i*2+1
NEXT i
PRINT TIME-t0;"秒で計算しました"
END
-------------------------------------
LET k=0.7 定数です。
計算量を減らして見ました。
計算結果
1億までの10^8 99999989(5761455th prime)
192.010000000009 秒で計算しました
AMD Athlon 64 3800+ (2.4GHz)
別program a=素数
---------------------------------
!サンダラムの篩 kの数値分析用
OPTION ARITHMETIC NATIVE !2進モード
LET t0=TIME
OPEN #1:NAME "prime_8.txt",RECTYPE INTERNAL
ERASE #1
WRITE #1:2
!指数とは、その数が数aのn乗(a^n)で表される時の、nのこと。
!PRINT 2
LET L=10^8/2 !指数は自然数2から8まで。
DIM P(L) !限界は1億
LET b=1
SELECT CASE L
CASE 50
LET k=7
CASE 500
LET k=16
CASE 5000
LET k=51
CASE 50000
LET k=159
CASE 500000
LET k=501
CASE 5000000
LET k=1593
CASE 50000000
LET k=5010
END SELECT
FOR a=3 TO INT(L/k) STEP 2
IF PRIME(a)=0 THEN GOTO 100
FOR N=1 TO L STEP 1
LET z=a*n+b
! PRINT STR$(z)&",";
IF Z>L THEN GOTO 100
LET P(z)=1
NEXT n
! PRINT "a=";a;"b=";b
100 LET b=b+1
NEXT a
FOR i=1 TO L-1
IF P(i)=0 THEN
LET z=I*2+1
WRITE #1:z
END IF
!PRINT i*2+1
NEXT i
PRINT TIME-t0;"秒で計算しました"
END
EXTERNAL FUNCTION PRIME(N) !素数判定
OPTION ARITHMETIC NATIVE
LET n=n
IF n=1 THEN
LET PRIME=0
EXIT FUNCTION
END IF
IF MOD(n,2)=0 THEN
IF n=2 THEN LET PRIME=1 ELSE LET PRIME=0
ELSE
FOR i=3 TO SQR(n) STEP 2
IF MOD(n,i)=0 THEN EXIT FOR
NEXT i
IF i<=SQR(n) THEN LET PRIME=0 ELSE LET PRIME=1
END IF
END FUNCTION
-------------------------------------
計算結果
1億までの10^8 99999989(5761455th prime)
149.690000000002 秒で計算しました
AMD Athlon 64 3800+ (2.4GHz)
使用プログラム
----------------------
!素数個数関数 エラトステネスの篩
OPTION ARITHMETIC NATIVE
LET t0=TIME
OPTION BASE 0
LET N=10^10-1+10^8*11 !'3以上の奇数のみ
LET M=11200000000-1 !'3以上の奇数のみ
DIM X(INT(1/2*(M-N)/32)+1)
FOR I=3 TO SQR(M) STEP 2
IF MOD(N,I)=0 THEN
LET P=N
ELSE
LET P=INT(N/I+1)*I !'N以上の最小のIの倍数
END IF
LET NN=(N-1)/2
IF N<=I THEN
LET PP=(P-1)/2
LET L=INT((PP-NN)/32)
LET K=MOD((PP-NN),32)
IF BITAND(X(L),2^K)=0 THEN LET P=P+I
END IF
FOR J=P TO M STEP I
IF MOD(J,2)=1 THEN !'奇数のみ
LET JJ=(J-1)/2
LET L=INT((JJ-NN)/32)
LET K=MOD((JJ-NN),32)
LET X(L)=BITOR(X(L),2^K) !'印をつける
END IF
NEXT J
NEXT I
LET C=502712575
FOR J=N TO M STEP 2
LET JJ=(J-1)/2
LET L=INT((JJ-NN)/32)
LET K=MOD((JJ-NN),32)
IF BITAND(X(L),2^K)=0 THEN LET C=C+1
NEXT J
PRINT c;"個"
PRINT TIME-t0;"秒で計算しました"
END
----------------------------
!' Prime_counting_function
!素数個数関数 エラトステネスの篩
OPTION ARITHMETIC NATIVE
LET t0=TIME
!LET ST=1000000
!LET S=1
!FOR I=1 TO ST*10 STEP ST
! LET L=PRIMECOUNT(I,I+ST-1)
! LET S=S+L
! PRINT I+ST-1;":";L;S
!NEXT I
PRINT DATE$;"/"; TIME$
FOR i=10800000000 TO 10900000000 STEP 1000000
PRINT i;":";p+489736021;p
LET P=p+PRIMECOUNT(i,i+1000000)
NEXT i
PRINT DATE$;"/"; TIME$
PRINT TIME-t0;"秒で計算しました"
END
EXTERNAL FUNCTION PRIMECOUNT(S,E)
OPTION ARITHMETIC NATIVE
OPTION BASE 0
LET N=S-1 !'3以上の奇数のみ
LET M=E-1 !'3以上の奇数のみ
DIM X(INT(1/2*(M-N)/32)+1)
FOR I=3 TO SQR(M) STEP 2
IF MOD(N,I)=0 THEN
LET P=N
ELSE
LET P=INT(N/I+1)*I !'N以上の最小のIの倍数
END IF
LET NN=(N-1)/2
IF N<=I THEN
LET PP=(P-1)/2
LET L=INT((PP-NN)/32)
LET K=MOD((PP-NN),32)
IF BITAND(X(L),2^K)=0 THEN LET P=P+I
END IF
FOR J=P TO M STEP I
IF MOD(J,2)=1 THEN !'奇数のみ
LET JJ=(J-1)/2
LET L=INT((JJ-NN)/32)
LET K=MOD((JJ-NN),32)
LET X(L)=BITOR(X(L),2^K) !'印をつける
END IF
NEXT J
NEXT I
LET C=0
FOR J=N TO M STEP 2
LET JJ=(J-1)/2
LET L=INT((JJ-NN)/32)
LET K=MOD((JJ-NN),32)
IF BITAND(X(L),2^K)=0 THEN LET C=C+1
NEXT J
LET PRIMECOUNT=C
END FUNCTION
> EXTERNAL FUNCTION PRIMECOUNT(S,E)
> OPTION ARITHMETIC NATIVE
>
> OPTION BASE 0
> LET N=S-1 <---------原因? (LET N=S+1)
> LET M=E-1
> DIM X(INT(1/2*(M-N)/32)+1)
> FOR I=3 TO SQR(M) STEP 2
unsigned long long isqrt(unsigned long long num)
{
unsigned long long n,n1;
if(num==0) return 0;
n=num/2+1;
n1=(n+(num/n))/2;
while (n1<n) {
n=n1;
n1=(n+(num/n))/2;
}
return n;
}
unsigned long long atoull(char *str)
{
unsigned long long result = 0;
while (*str>='0' && *str<='9'){
result=(result*10)+(*str++ - '0');
}
return result;
}
extern "C" __declspec(dllexport) double eratos(char *s,char *e)
{
unsigned long long n,nn,m,i,j,count=0;
bool *x;
n=atoull(s);
m=atoull(e);
if (n>=m) return -1.0;
x=new bool [m-n+2];
for(i=0;i<=m-n+1;i++) x[i]=true;
for(i=3;i<=isqrt(m);i+=2){
if (n % i==0) nn=n;
else
nn=((n/i)+1)*i;
if (n<=i && x[nn-n]==true) nn+=i;
for(j=nn;j<=m;j+=i) x[j-n]=false;
}
for(j=n;j<=m;j++)
if (j % 2==1 && x[j-n]==true) count++;
delete [] x;
return (double)count;
}
OPTION CHARACTER BYTE
OPEN #1:NAME "eratos.dll"
DO
READ IF MISSING THEN EXIT DO: X$
FOR I=1 TO LEN(X$) STEP 2
PRINT #1:CHR$(BVAL(MID$(X$,I,2),16));
NEXT I
LOOP
DATA "4D5A90000300000004000000FFFF0000B800000000000000400000000000000000000000000000000000000000000000000000000000000000000000080100000E1FBA0E00B4"
DATA "09CD21B8014CCD21546869732070726F6772616D2063616E6E6F742062652072756E20696E20444F53206D6F64652E0D0D0A24000000000000002A96B5046EF7DB576EF7DB57"
DATA "6EF7DB57DA6B2A5766F7DB57DA6B28571EF7DB57DA6B295776F7DB57DA6B34576BF7DB576EF7DA5721F7DB5700ACD8567DF7DB5700ACDE5672F7DB5700ACDF5661F7DB57BCAC"
DATA "DE566FF7DB57BCACDB566FF7DB57BCACD9566FF7DB57526963686EF7DB57000000000000000000000000000000000000000000000000504500004C01030081A3D25600000000"
DATA "00000000E00002210B010E00009000000010000000E000007070010000F000000080010000000010001000000002000006000000000000000600000000000000009001000010"
DATA "00000000000002004001000010000010000000001000001000000000000010000000D48001004400000000800100D40000000000000000000000000000000000000000000000"
DATA "00000000188101001000000000000000000000000000000000000000000000000000000000000000000000003C7201005C000000000000000000000000000000000000000000"
DATA "00000000000000000000000000000000000000000000555058300000000000E00000001000000000000000040000000000000000000000000000800000E05550583100000000"
DATA "0090000000F000000084000000040000000000000000000000000000400000E05550583200000000001000000080010000020000008800000000000000000000000000004000"
DATA "00C00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
DATA "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
DATA "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
DATA "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
DATA "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
DATA "00000000000000332E393100555058210D0902088EBA078BF8518B8F435D010063800000001E01002607004B6CFFFFFF558BEC8B4D0C56578B7D0885C975038D4F208B451089"
DATA "47300514FFFFFFBF348D47185057680000012351E807001EE78BF083C41085F6740D7E1E0FEE6FFFF6B7F681CE190780EB138B4F040D0150516A0257256DBBFBDD0059235F8B"
DATA "C65E5DC35CFF75144A08055F76CBB710020CFF701C18221F271485C07EDB1E7BB70836C00D432A568B752876226CDB7E64766A83661800031C4E594997FFF6DB460C33D256BE"
DATA "8CB24C85C074108BD08D4ABFFDDBFF018A024284C075F92BD1C5088D420183610434610C008931EEEF96EC89410837DE33FF38508BD73ADDBEFD931602668B0283C2053BC775"
DATA "F53ED1FAB0DBADFD40045502263C7904020C5F4386BFA19B28386A298B5510538B5D1C2F85FFBFFD2083E900742A0401752884D274060FB6CA41EB05B92A976EA1753F08283D"
DATA "4805180C89E1E6FE85584F7814EB0683200010E47030407CF842830834112457535120CE52D9FF5D3B1DFDF71312FFD65E5F5B5DC22400BBBE6DEDC20B8E742D754C4A02420C"
DATA "234DCDDBEE56100BC8C442101214234510B1DBB7B73B0B75053B0D740432C0AFB001B33D6CEDF683EC10A08BFD633BB4CA5B81B6BD75BFAF00FCB081C9E10BFA8945F4420405"
DATA "B6DD0ACBF80806A54DF09D1C0E735B3BFCFC8B460451458EBC010C9F860D0583BDA856140010FB9B1BE1C7410C2351134441188D45F050135FB804731C01BCA4DF1C5E8BE5FF"
DATA "6F976F8BCC83EC086C242C57C0660F134424048A4500DF70A1FD3C307C478B4C0A485C249B3C397F2C0FF6FF85FFBEC08BF383E830998B87D10FA4D602C1E20203CA13DE0ADB"
DATA "DBB7FFCB0103C903C18BC8370113DF453A7DD05F59D3D8BBB7C28BC1226308C38B518B5424080C1ABFF6DCCC00571C120BC2CEF8FF6F3730C3537ED98BEA0FACEB0156D1ED83"
DATA "C3015783D5FB567E5C595352CF057C6F03F313FD1E5EFAFF7FFE01D1EF3BFD772D72043BF373275756FF742409DE8BEFE6C33EF6072A03F013FA2672DF7775B3F7DD72D989D5"
DATA "8BC35D5B7900EF28768775AD71D3363CF2343F025CD762DBEF11448BF28BE88907181079B37CF70B7F897C241C8BD88907143BF7721455EB720EDD05FDB7D62E4AB1405B5720"
DATA "28C32BC583C00250DB6EADF0822E0410DCC389E218156F63BB46CA5F1BD66128220189440B5DE373B00AD266B3890124ED3AF70D052CC60408011D153B1172F0DDC26BDC62C6"
DATA "76EA77822CCA3528DFB0EB4A1B512C8CBE03C43BF90F87A78E60B6770772083BF0099D0C18552E6DB8FF82EC0BCB750A657ACD44EB1557C6BAE6581C5A529F3C1AD070C3A54F"
DATA "771845EE7712DE18EF7EE9AD8BAA803C18240403CE13D7831C772C72DEB0DFDA0A3B70EC240F1F4000231DF4DDEFDBAB180F142572E6A9CB76E083C6B5EDCBB6A4D7BB7C0F82"
DATA "73FF00773BBBB7CFDDDD0F86670B2B8B19348BF5E9306675BBD96E4E44004F4CC683E0F1C8007397CAD724C67D087DC201479FDDD7D8DA5109D0BFA94467CE785FC30FCA76C8"
DATA "513018C5374135BCB07B67D70D099C86F20F1124DD77DB34C103905A5DE91A0D3B04716772DD6E51083192050C7509F62BB4FF90F7E1C210005305D81DF764A507ACFBD90309"
DATA "E103D35B1ACC0053569EA1B57619180BC2B5139F0C776337B3F7F1390C07D3EB415502FFDFF6E79E1013D1E9D1DBD1EAD1D80BAC7E84AEF1F4F7F3BF5D187714F7E603D1B477"
DATA "EF363C3B2777087207DB0C76014E4C35DFC00C88736E142896CC64EFB4506E080EC3C66EAFE95010C60750EB477E102303D86B0C237E1410DD37CD240C0F0876094E2B181BF8"
DATA "CD746F121433DB0908D3DAF7D883DA0BE16B5A88CAC3D9675E10FBA60BAFB94872102D0388EB1CB9020E2F04EC2F90EB0DB9031DF07EC025FEEEB71D067F3D0D807F0F834C3A"
DATA "F30F5AC083F902FB4BD3154D2415A82FC2760ABA103763B76E83CF08290FC52A21014635ED66DE358011C60F820F096FC80333C8DBEE73F10104D1014601743AA0F07FB746CA"
DATA "B80557D2097422509BD93C2487FDB66D400403A95A587512BA026033676FBADDC0BA0A80C32BF6CE0F84A6B31D7D5BD33560072568196EC3C02EB7EFD672F013C2F17BD103DB"
DATA "D3EBD42EDDA5FB7E3410E1FBE507DAF3DC2EB7A6E90FE5E1FA03D3FC66CDB7E6D6DC3462C9D938DFCFCB23EFED0C4DD335E913CEF5F125D7EDDC9744F8007E234434EFD710D0"
DATA "610361816EDA0408D224741C23FBD36C1AF0DEF2C3BA08D3EE5F7E5BDC20F70FB783FA0874088482CBE975FCF3AF7528D9D0891424C7FD00EE33F09369EC080510695825E7DD"
DATA "177224BCF8C420C3E00405E11B21218FD98EC8E905836B0EF0620B9E5A83B010DA11FE08B5B0986197D83E762F240429BA01C72C5BF6B2E9EB140B1FB30D7920ED73276630B7"
DATA "6B6407E1450107557F3683355CD867033D88DA72C36ED7EDB35CDA1AE395F42304D42389E6A68CA579748C945D3B636EF9088CC282115B8BF7F69B81FFE41B2AC1C1E91F0658"
DATA "04CD23E766DB6250856D1F16C9CAC1EA7CD7DDCE0CD508590D075810C1C38DA42436B0D83B873F284626CC22364B4E2F6B9EB7054A80333304017420115AEC5E7805FB40EB30"
DATA "AD0E4EDD648BB7F8062FE8C0EB1FAF10706F0BFC0A5659EB527DD20F95C019BD508B3F080B6859BE826A1068439F770D0C703A131C6A00BE59AAFF3FE85A0750DA0B4E0DD488"
DATA "45E3B301885DE7F76DDBE28365FC5F3D2E183674076A071BDD0EC27B1199C7050F9B0E213A7465E3B779DB0812BC550012EB109B2652C78B7764925B10116276B11C26DFB6D1"
DATA "66B10C2CD64085762944092BCFF7352018081D047A68A150B7390232DB8BC7037E8E9EFDAFFFC85E84DB0F854C0C1193FC0C6D76B73E9E1E56CA0F8E7413B550A10D8DF3078B"
DATA "36C2FB337C83BBFF4C08340F62C38A4FC8C37F5B1FE39C1B59C36A0C1190F0BEDDDEA126977F042AEB4F48A30D4B72098311E40C02BDC28045F88E832521A0D6580AEDF68486"
DATA "1038C733C99385B27DB32DFBC17A32B17CE468F42213B061C0465B5B58EEFFDF0A046505D1965DD7F008EB31D3570853EC0CEE8967D868D43AA8FBBE1719E0CC24BF160A03A7"
DATA "3F8B3CECAFCE1717EE5922114C1AE926DDED2B27751E175044564C7D6F36096526040ED6DADFD603130B12188A590A8F17DFB053F6037548757435129FEBB0D4C616DF4DB401"
DATA "4030A39394DBCC0A071A440E5B1B20B81B65182F33F6382FC46A42836A1769E0C6700FF9D49FDE123BA9C742AAC082C144C07EB4C225A1F710B060DF29D8F20BE50C220C132D"
DATA "4D5DB58F2F671231ED0730146A33D8917014531EC574D4161DAE5B12E90BD0370110687D01BED5E0E820592BC823D3C83305C0B7C1EA127008A4483C03C8ABFFDDBF6B41148D"
DATA "511803D008066BF02803F23BD67419889B2AB494EE0C47BB0342D56E176E0AC872CBC2281875EACE5B75BB77B08BC2EBF971163B8F0311C3E2CDB1E164A118AD56BE3DE75004"
DATA "EB54A215DAF0D01A298366B6EA2EE0B10E23F0355E0376646CB03474BE9A33F4184CCB488D3B82F759E577DACDFE251B14845A0B3942D514CEC53EF71FEBED2C124D0E0CCAC0"
DATA "21C26189184B6BD1D5242C1D506A555E1C47B265B3C4182DD55D84AF37CAEFE618143781591431B777E222301B3E2B8F3967594A1B4E2EF669697300C67A2C01BB9775DF01CC"
DATA "1AE6102C300C0A0E01B68E371B2AB1E9230CB60D8701195A72FE9C7C61B28EC37B2A1A267F9EB9F247BEDD49EB571220F7D8591AC0FE352C34C244C68D0D57CABF00431EE131"
DATA "CF83C8FFDA0214A0686559A500AE3937FB20201032138715D3237D805F2A6A05E9CC6A08A88D5D3CC9D0B84D5A9A3905C1DF7E77B7F0E460A1063C81B80C504517754FB90BFF"
DATA "3A6EBE011E8818754137B91B2BC150513FB89D5DFC0D90CEF7400E8075688D16A4210B76B52AB64CBCD065DEC981387237942407E964312C32C06C3C3C84130F80650937B902"
DATA "5F277C47874080A72C15B3272CDB061C0C12D5395507E18C090D695968EC8B118BC269C32183E1321F9670127E5229376BEB0B6CDB5983156BDF5A1BC0F7D023CA3AE060F616"
DATA "846716D848B84565F400035CFF588BD95A5657BF4EE640BBACBBED6FD5BB80740D85C6740942A31A14EB51138DC2668D706F5EB0D8B173A1C27733450E083108364E36339024"
DATA "ECF89EF0DB5B6BDD0CFC335C0205C83BCFA3B90BA51BB84F5BE685CEFF250DECB7A9DB114725C1E0F1890D7AF7D1079FCB356114C54F16CD302D9B8F634D10C3C6301B56B85F"
DATA "FA31D60B38054095116AE3048308043F33F2B589050D70022220F0702B477FE881EC24F3256A175BB7A0D98717AE05A8CD29D98D4FF3EDDB85DCBDFF68CC026556508935487C"
DATA "CFEFED5D9989858CFD1A898D880595849D636F3E9F80B57CBD78668C95A4068D72E4C891989D748570A56C5BC1BC39AD689C8F859C3BA78563AC79BA94088DA0C78101AD581B"
DATA "D9BE8B40FC6A501D90A88E88B686D6B9308BC70F074006ACFD230B27CA7AB414568D58FFF7DBB6E1D8C92C0A471ADB97FEC31ED175B2301C8DF818390DEA5D286C58C3F8FC21"
DATA "05E4B646E2D0CE670B480A53C112BCBFD60060BB04B918F05977B0C13E40098BCF5DD783C63C83B54DA9EA5F352A6868B13A3594FFA496A3087D075B199064FF354DCD626C9B"
DATA "ED6C038D2BE04E577AA3516A3B3B33C5FC3AA83AEA5F905A0B40D645F064A3DD393A460DC352642500595F5FC1171F8EC051F2DD51563DF12B40F7B7A4FC83E9C70676FC1320"
DATA "5AA339A2C2C8036F05D87B539776C74126B204C7011F3876A69043B218201FDB633F83FAF18D460468DC83202960A6A1772D503483C004502C1CF677F67345438D416EDC171D"
DATA "39593C5ADCCE4616F63A0159448124BB2D5C563D16595B77FAFA3E8D4DF49E98D0EC8533976C26EC58CC1CD101408B84D76D6877F205B863E473E8D20DFF6D4CA8EC2C5333DB"
DATA "43091D72106A0A0CD696EB600F74A305ECC8DF85D6F7C0830D1A02D197891D338DBABEF1FF7DD4530FA28BF35B89078977B24F08895700D4BDFD06168BE08181F1696E65490E"
DATA "DC356ECBDF4A1B576CCB09D83547656E75F794B51BFCD96A01581AC92B80C1DA40DF5EEAEE74434225F03F583DC0067B74233D60CDF6CFDB0602061C3D70153D500603140E03"
DATA "7FE0CD2C070675118B245083CF01AE3DD8B18908EB06107DF4074C8C2DF418B8E48622E87C32EF5859B6FFACC1758D5DD489038973B94B53D6703DBDD8A9000241ECC5B64E15"
DATA "688DC9024F171ECE189DB06D6D0004CE4CDEFE6EE5176474550610744E560F01D058162ED43D4A55F405F0F4402FD036B006138306753373B6C1BBF92FA13CB6083E03D9B603"
DATA "5BF66920413B121720AC85983905136F5BEE11F8C5EE391720EC17C33B0F24D071E3F27502DBF2E90EB2BD703C22F00D6E59B62E442A2C30C6AE3C3677B63DCBCD0138006809"
DATA "17C00AB0049E352C12305D18D3AE3C20166A02599B195869DC2D993705548915971D054C8935B6AFD5DC48893D44D51870060DD26C5F6964204014053CF0DC2CCD25382D349C"
DATA "8F68F9B36CAE2DF2075C04608D4508074688F56C8BB617A8047B634FBDA11CC9641358B709FD33F61A5CF909686A04586BC0469864B30F806C028B3C89EB9CEC1661F80FC1E0"
DATA "1482BF0EF4B0B240278A519BB02414E8A9488DB07D417072D0212B38593DDEDED8BFD766890F3BC6750F163412104477FE588F20342B3B1FBDE0CD40ADBAF3D18D8DF419F8D4"
DATA "6DBC6804A0518917B4BBDB75F15F85102005765AF820A800BF0F6001CCEE571E0197023F5678DD5BBBD437A2543629106CDFD9BE485006E412DB0BB418DBB9EDD76A422AFCC1"
DATA "42D3CED7C4A54D5F8B63CDDC482B9023C29B64B76D8C90FDEA50006864B6456DA124E632E4C30D8460D06E4684590297BFC5D2E7088B065CFE8A8B4E0403CF86C8F6EC330C38"
DATA "4846080F0C8B8D40C2BEE912CC001B1C6DE3861662D6C645FF0643FE4B9498D17310495745F4E15CA522B22F5067F81AADD96703594727F647A2B560F64078D269E48D85BFC5"
DATA "6F02897DE88B7B0F43FC83FFFE0F13DDBEC107C44D9847028D04301C81BEE572B1058172510074668BD6C87DE3EF47227AB101884DFF30786A7E575277EBC3DF1D63736DE075"
DATA "346D20F4642B6807BBA940BB288F6C23761A8B35119B0428F08BCE343D8B9F562E6A504EB4A72F700BBE54AA5B39783B5FEB4BD640DBB78A5C8BFB83FB8C85CD8477B4564DF7"
DATA "2FEB21D500EB21AACF80C72E301E68EB8BCBBAE522C3447B3307ECED552CBE46839D41C327D75663C3159AF0672789580C18BF76BBBFED2D8B49952291CC05245D04211E0779"
DATA "C9AEC023F223A4242E6ACFEA2B3B26C5232CDF93D563F5D73522F659CE1958EC1BA9390A1223D73722348BC5E82142ED152B7E6C0D87973C2811A9307239B545A6AEB6EB595E"
DATA "F18AA8835A8CAF0CDE44D75E2E2C34CA51C9A53C0169C001E7EEE5EF0083F9200F8EDF0081F980050F8C8BFB45FF89BA1150017309F3AAFEFAC3125AE1DEC093010F83B2205B"
DATA "FC46612B5770EC660F110783C719F1EC0BD5E7F02BCF427E4C19BEDD6DB00690287F0703471004207E9EE77930405060708DBF3753EFF83D81B01CAFF7C164DAC5EBBB4BF6B0"
DATA "1377733E73B2721CF354BBA56AA7F37C25201373EC58B2DF6D351F4174628D7C39E01FBF2BD59F2D1B030E8807474F0D5D83B33D75F21504FCC3043B6CB36D170477F87420C1"
DATA "9B059365DBC49A47041F0808DB5587D975ED547FD5807F45AABF636974770FE2428D51018A01413EC117FA2FCABE8D590153988BF0303BDA1B907419FF3713493A3D4AB7C0D4"
DATA "CF4C3D08C6505A357E0DB125D05975A6AAA19BAB017101C6565F5B305BB0B4627EE93626D374B63F832600C6461E5ECB205A74D54B086A08598174941277E4DAFDA51C791CF6"
DATA "075A90DE7EF7178B0BDA518B018B7020748B78184212A5BB71895DC97DFC250CC39462F5D30722409901C95CA4918D42D55AE0400C2E6241E3C28F353C5A171A6C6C8D04971B"
DATA "84B1FA055B09E0B21568CFFFF15F802573F27A33F0D3CE3BF774697407370C768AEB63453B7514535D70ACC8BF1E66C42F0AD0D166B71375EC3B47BF295DE1245AFC7F5C2F3B"
DATA "13CF9EFD0F150D73598703EBB926EBD9078BC2AD2528C16A200C05D3E73B4470EDFA873B3EA30D0AA0A1D4357F5733C08D3C9D749E0FBD99B79FDAA80B6D01E123C1EB261C9D"
DATA "B167810D289456D60853735A60069F607527CE56575DE164B713565619EB02A91D09B55BB10474875EEB11D62EC6BAA007C65621585C8A7D77B35F805400B348044409C06000"
DATA "47B71DC6D6170F01210E8CE88AEB157B2EFB036A32585E3F5C5809EC5926ACF43F1A1814425AC49EA3747009B6087B6EC2421137423999909FE78884886A032000CC1067204C"
DATA "82B006B167A49C09FC48B961859B0F34CF319EC3C6A202724839B8B0CDB517C409B339373C6894AC73353C0B39E69F6FC0467D5473C839C0C86A6740A692064CDC9BEC40B1D4"
DATA "0911390C3C7B06640850F0E8092926AC1486EA14F998B1D929EB0C0E4544E334C6588A57D2BF55D7FD41888663DC6A0959F3AB5F418FC7E069122756BED7D78CD7D6271004FF"
DATA "148214CA95DE265381FE40B955AA936A92FF57DA149ADC80EF78555250515173221006DCC11308C4892164892585A875577D308B58742C331935B6E4965808FE333B4316FA08"
DATA "02B6FFA5B6F2762E8D34768D5CB3530B68B42DD17D520496CC77AAA15C38534A8791E7E8831D810CB0EBB064E500021C502031F9D5AFDB6A3FF7DD0611B82774333A9E287DE1"
DATA "48B7651604680B96AD355D740210146F0EFCBD66215D23C68902B8BB2016AD150FFA1096D96EB906494C1C3E711C0218563B956C2834EFFD13024BDF8AB433DB33D2C333BD74"
DATA "ABF6E8D15BA212238BC15ECD63EE5CAE1DC933D2E64376C4C3064B005222C2E1930ACBDC6DB05C6C645251769435EC4A02130A0E3D79A846BC93681181597B95C78A1B716085"
DATA "742705750EAC8D357E1F20611E1959680F91FBD56A9B9FEC22DA9AAB952D8E7660FF3B33898F31D8CE30A9138BF83B59C76EE0EC8F1A6860426A28C93ADAC06CF6731A1B1256"
DATA "305A30D936EC6F2DE2EB38FE826F7BB60F56AC8BC7E2C3F0DE63E1621B5AEDA39AB5BF683816977DD7504A077EEBE503CE92B980DDD5271FFB682FDABAC7B9CAD0625F09D851"
DATA "F3A00FE220D8B18B1A0C342A15C21BE8567CDBA0AE33C702FE1872DB2D13B936A11E6F893CDBA07D391F716B236BB80D7E19FBACB8B574FF0D3AEFEE0175EB5F6960908353E6"
DATA "389D60DA2DC51BEC05D155F0703A487D249888D55DA5B93266D78F3214DD6ED092FCD328520324529E52B2F1A3E18E08644442FA965A55E6FE64A05B0EE1A2D50F30A97AE174"
DATA "9E5B2855373A837CBDE9F2566306063B74762D558B0CB389274D9F0CAF567CB3571744BCA7D9A4B3580854B7B6EC96A443F158FA648B0FB540D77B817904837851E952776C0B"
DATA "2E175108ED01A651BB91E051B0467003081BD8EAA59AFC43A26B0C55FA58331676DCB7595BB9FFD016FFDA537D81D2A820F284EB17A808A9F2F2DD852FA8041002EB06A8016A"
DATA "0358E4BE50AA947D0203C05D336DEBBAB56BDC5D83E4FC043E6B55046403B46CA4708800AD0A0B2DDF736243D86DB97F8CDFFF73CE26B51775268365C0FE501971735BD70310"
DATA "1B0C0620210D4580CF4A81FB5F28B837F63425B35DB878A4590F3C46843AC6255BC085B6DD38560D18DD4CD9F970DFBAEE05081010DD1C24477C2B4A35D6AA24000AA9C10DF7"
DATA "A395EB92FE3E3037D80701BE00895F33CD5E8B8BE382C843875B015E1069FBC2B73BE61FF6C30416F64510F9107040DCDD1E3E5C5915F7E99A728BC3C8219BA1351A1804FBD6"
DATA "994BB53334849A3708097C1BEBE290007208228B1059B9000C6D28DDA2937454F4B37437DF1C7DB306081A3BC1756208C6DC19DFE092FD3705ADBFD0F6C4057B4CEB4815E481"
DATA "3DFB0F2C1AEB32157A1ED89109191E08C8EB07CB20DB36D95619A2FE02CB0DC26C271009C1CEDC76376A153B014743DD0145DAE941CD2DF4444B911C10E2C1E0A0BD455C80BC"
DATA "BB6233B493C056FA94FCDDF8B7DBDB55F02F3DCEFB0C7D0745DEC947EB59DED90BDEFE155C3F417501422CF6B903D5D66AAB46324BC813305B47DDDCF63EEF7D2BA2F081F0C0"
DATA "5BA91C56AB79D1E8F68F068D688B4EE3D5689B88BB8009D16DF40DDADD0A51536D03A202C347DD106EDBB615036647325F276A107B6B6DB8EFFDBD11CFBD0B17151EF18E0EEF"
DATA "67F65E0F9459092C5A13DF14CF339A391A6B6822F3CB95C8151A360BD882C96C5D8EC00B08A720B7BBDDF610F6C16B0B0DBF8F180958040F0274936D6B9E0C9383340210014E"
DATA "4E96939104048E081A3539590890C181D60D3973A806C1E09D46D45CBB7041082F1031051612200F19AC6A1108D1E83D837DC804C1E8031202061DDC91CD14120523C31112F6"
DATA "6EDB684355C299071B83490C100B872C2FCD0445480C0808045B28872C100250060B2787E19AE59ABC35222DF535270C292E08B721BBD5B2F08B01EAFE02D3EB120E23DFEF07"
DATA "FD0BC3EBF02220FC450320903F836C3E022220E3EB1ACB60AD65E704B34BEB08B72E952B21E4C1E19308816EC56ED1E1E022310896207D20BB7BFBDB442C406020E10618D900"
DATA "0BD958101DB7EFF61B60365D1C1A60E115031750EB74ED6CBF3A574120A4E30833DD90ED4CF2DD4D2260297EB5DF45DD031F943E1DAC3B83466B500D47A0402DB7D042A1F65E"
DATA "310390FE084FF3344F08FB04F702EFF0F4F63401DFD2BAFFF30E03DE7C4D431B3522040D7528810E1F9ADE1E63EB940625FF510D618906A1DD3DDFEB100FF7041DEE211645DD"
DATA "EDF99E6D024307193E091A183B6BB6B7EB1A0623C22702090A0342B7FFC2C3265ED6D94150D91BEB05DD06DD1B2B318C57C1F0D4429F764B447CFE077718E433C7066BA6161D"
DATA "85210C2152039E452E550C8422B6747BA14F3914C515BB7088403702FCDBF81D7CF1EB350C1074894DE48207994DC555F745E8613BD4D12AB6031C1709B6F6C065F4206892FF"
DATA "F30DF83CB81A5D2489C44C613002CFE0BBE0507673260756C38A0D7B3B59DD275EEB1B352992E4B677BC1B1A202BE4BF0352B4AAED0C53732BC65F6A706DDE03E63739671BDB"
DATA "F7D3686A6EE123D874E5067D63CEC8C137757BCEB15955F856473BFB75E4259B6CF0225E235B5BAAC429965A96293660B01FF40E8BCF40D7EE0A2183567B0C438068805BE566"
DATA "44B7F31C2C7CC1CA9A0E8C581E73063BC01314173A5AD6622305868F3F0258930FC1C0578D01803D047FC0E400883F0A599935E0D704ED5A46AB3577D3CE58C0972CC56BBCCA"
DATA "8AD9B32DD1E4385259954D31F6ED5139EF04B50FB8BD39416B2D1A301381748050E233C13FF5507A8B0DCE2FC643F56443D658C8C0C69BCA57E0820BB1059C15320E4D39D8B6"
DATA "808E39BBC1717529CB5250B8E1354379084FD46E8D1A7D2F57833BCC0B895998268235630F5EF16B11A3554838CF08212E516883006A85C4C2AD510BBF42248D506CEBD55880"
DATA "541B0FBCC1C2756D5E08B88639D84F9EAD95FB744481398D0B82078E22D69BE5598F1190756FC7465E9AA7EB8A386608865D837B9AA77954824B84424C270719649293B402B5"
DATA "9EEEE99A0222288D19088E10BC8AE66985078ADFF6305A2CDCCF1E395989ACCB705BB524D104EE4F4A8DB7509C59E4A1B16161641CF44C1D81461C86834396E807A01B6AB6DA"
DATA "906C8210123530D563AB2735092E311986021C2CDC042C701C38003F99C8F187C35B983087011D1EE31FF14258753C8B1D41D383E2745B64A476CA7E0D2B348507DD2ABA3A33"
DATA "D9CCDF8B6EB0C2D3CBC5B8D3881CC2107C65610AC2010B583410DD8B7A7453113630419E6FD22010383419DB2170BC839E01AC17F0AC7B3085162CCA30947380A34DC0FF0D2F"
DATA "6884C7CCEC5C70FA3979E4C80BC484070BB52BB3488D5ABF9BAA64A130DD40680FF206463D88017B118C7A58122A1878CC47820338E2285F29F01B6C13473DF32C3C03C18138"
DATA "37FEC9433FE6481875DB8378E376D529C940DF83B84A15F9239D0370016F9AF6BDD0B769B0BC617CE5235611D4C2BAA4687E210D0C678756605ED33BD422580E8184455CD9A3"
DATA "8EF4A01DA20EB1D92F7B83184206290B6B28BC60D81498FADD2EF20F901C3C00741D50AC0453D3A5788AB63005F6EB2AD9BEF799EB32168D0F1250B9326A4807BC02B1D2666B"
DATA "6AD161CB0071FC53A5DE2A1E1B47F78A07A00F81EEE83C3D7424CE8D5948CB4601B752F703F18A060AE4CDB5045050E9BF8CE9D8DB746D895DFCEB521BAE523C2077803F3DEC"
DATA "0C0109B6524EE55017194420C330571C814A1AC0CDD1417B9989309CA17D7A0F6C9A5D03F843B86B1DF67DA9EB1153D7E7BB59AB0A84BA100C8AC35BB35210FB3B50654B41CC"
DATA "D0EE3B706B701F4AD6FEEB0F30C33E6CB48D7F3A071FF05640BBC001063FF10B7E0476C1C3E050FC7E0859050819FC3BF775EB38A5E0696308D2F03B14481776C0BD7CAF7B1A"
DATA "44FE5B6124208FD02BD183C2035633A7A0D08D7BEA027410B0FDD6A8C24C714689118D4973F061C701282C3278335AD023CFF710CB160E7540FF341B8BBD357A5C0A44672467"
DATA "D0B165E9E3BD85C8543238B9929C884E18143EBD362A9F7F343E39680441E881C99969B23410BB50E80A399217350A8FC1A72640E57C8D4D0E4E2E0C548C80CA658767013234"
DATA "4AE82790444C5E33F9791AB0186C461890C1D0686C1B14538B9718CF3929066D30D538361BE8196EC085A83BD25B047C33FA8102BFD0D2D2CE33DAD3CF542F5D810845374B08"
DATA "B51E58DA45A57DF40AF08BCEE22F1147C28384DF7260390374ADC48D5A4733AA33F2E43DDA6C1BD689032D95E8635F2536DCE75C5A00013040C8AD6D6DA1CAAFF8402CD30649"
DATA "E80ABC54CD3B4DF4B05A3B0F5DBA058BA00F898BF9BDD8629336DCEB8E803357394EB7879596DAC2CAFAD3CA2EE8338E6DA56666B2A410055004F46A11CF06085F4CA566C361"
DATA "24536615F856C4436845CB153766828B8509E42D1EBA1B19B6D6DB7EABD88B763AADF0141F3D56BDAFCB3BFE9A2BF3B8F1C18876E18DFED8F07702FB8D3C4614ADDBD6CD935F"
DATA "21721D43B521993EE25439FAF5854C6D0103AFC7281C82EE1FB6C21F8A648D04B18BD91E0A18F1EC8D34B9957DFC83231A12D1929B225F72E468C76B68C61BD2F7D2327123FA"
DATA "23D08955FC3955F45D86E6A24D6A46EDEF7CAB17FD189734EB538907FC7875AB8D5A148B09EF8D478295DCEFF8110B560FBE0C8C2ED4E7950E08025B5E4F3D88480C6CEE82E7"
DATA "6A098BAAB1AF142351BC0B34D0326B796059B6CFC828BB0552DC623B90751F5972CD45AB3D7E02738C6C67C9C45AF8600CF80DEE2683C38B15B0B90D4CD68AC820BC1E9D9E57"
DATA "44BA428A0B58387922673E21BD0217568C1A8FD6A44DDAB8E7F3FB40424AA2052D1B58A65794A8CF3C5F3183F8153258100A89A056C267D7DDFF811E8450AA38E120C0DA9095"
DATA "6A2C0AC489123272C9D89C10C4A09C13DC9821760DA06A421ED8555754F14E8D4658D6F0583D6055C657DA74296E2FFC12A9C9FFF00FC15416813E371390EDE0542D070D09C7"
DATA "06508AC1EA0F64D7C86CE0892772BE60F0E84D56D3880144CA3A2D300FEC6C4342DB24575608990D43FB4C44A6FD68C5173902084207785A16073A9C1E2B392CA170347F899B"
DATA "7614931DCD3A97F8742D63B173E1538BF01E905B886D4530156D745AF0D8F82106A2573BBA591B5EA13F7DC05083FEE077C01746EB146AF42A9EB95AF28537CAC0DD846D2656"
DATA "558C12D9EB0D07CB2867610C6196AE9A284456F31A0C141F2B3DA30AC917C6E42D6A165E896F3DAA4F384B311519FA2BF2444305E08A043EEDDB05D2B39B7633F15FBC0B880A"
DATA "2E22EB9EFE36F7F1F6EBD33B8F74DC160AEA59F60C48C13FDF80027421F507958BD8A248686389632E3E1049673C0931A1F24B6F6D0914E0FA58F7F6CE0C64226BF072340FAF"
DATA "18F9086D175B08CCF90FC6471583680063F8018DC19C03DA74EB161D20D40F0856E573259415076C31A82F1DE14456EA8D57A407528D770574BF5D5B4C8938484850890E185C"
DATA "2DF8F5B7C43707398B0F3D815010EA622EF85EA802750DDC0D6C01D8745918A1634DEB3B0C6DF1F225DCBE6074272D72F141EDE30D5AB80711771E0D028D814436CB006CB06A"
DATA "0E22C862EDDF30BE6E08BC042F640DDB20628D1977485189082938EE8607C315B7E8DD7506B87F627361DB88C33F14128410C340ABBCA4E21C648F1C48D00CD1034364573020"
DATA "84F443344486B33ECE9F1D0E000112125353A06F506BDDDE53E1DFE057F807AD5E057A09DDDE053D885666A96AEA5FFA0E0FB7C6A9F07FEA7CBE6C265AC026950D0458E18A77"
DATA "AF6ADED9BFEDFD2FF04182AAF6450E105D03C989BFBBAE1DCCD2791A010903D24F1774E8BBBA35785221CCEFFF3623F1B7E080DA66890EAC07800F085472670BF08E398025DB"
DATA "ED383D908FEB2310DDD8128B167AB793FE15C1EF0481960712021BE270EFFEE581385FB4FB6DAD48BB27454D250F5C6EFFDDA0DD6C8D8927C1E1040BC8674DFE394E42216202"
DATA "817D971635ECA2E6CD750797150AD9700BB3123D090F080254F8F79BBB4D0EBAF87FB8CA663BCA03A1F43BBC27EBE8BA1C0D11F7191AC2466B6707D01AC4CD0B0A5FE2B08CDD"
DATA "3FDBE20FBFA879682F21B59BD9145245DBAA0A6DD150968B66988523611FF8D96DF82B58DDA01BC834670ADB2DDFE0DB56D8405B179B54109B7A1106D9DC6DDDF49B0C2310EC"
DATA "E10B0DF4118909DAD9E8DEF13DBD522B5C0DDE8818472D7397869B9A6CD8B3510FE41C684766D518510578641DA081FE38F43DEA08F1D80A402159DB63C0BB8D526BD0180545"
DATA "5C6C0EC88F7A57F41DA01C500B6CC94B1DA047D4F9049570DA0248CB04AE951A371C43044AD0581742BAF0402A49BD3FAD206E1512C8D84F688C6073B91E32579799C89BC191"
DATA "FFDE01750F81F90751DD60805C212F400E88C8016C766A62AB4059361E2457284048AD00B03A67C047A111B604C88B3FB9276943202F40401A65D12F0A481C96416A75D1A06C"
DATA "95183508200AEE40179288C1082FF6B6EED0ED8A0A66236C061BA35371E4720183A07F0F53429B01054125C50417C91E7C75D526A01082C813A28641E75ABD64601B2C98476F"
DATA "46C939068F69068E72C936ECFF703C0B0A3034C925975C38282CB9935C724044B060CB6CD9218B0DCF40AD10C9ED09A3E5FD34F1837E4CCD36B844F328FF764C6067464CC105"
DATA "4BF4E88FA774143DB38578E2276844753C5F2D5968C74CBF5D4C5EEC115EB0F5BFA0E609038C219446B77A2F6205BBD81909383DFC1D0D562BC6B4D0069BAC0524370C36F820"
DATA "01EEAEA1496864CBCC670106CAF85C51EBBD810AD83857527857EBE5680B66C1F7AC575E4D9AD821C60A9C549868678D4D28D80BD57756CD90B98178AF78F0F64186E4253056"
DATA "56B503319256F070C05E76183F53EE33DBF019E4009951532B83BCEC2253EF7509EB4F1DE261088BDFA22441718A60BFCA6F0BA37FAA01CBB1615DE344A6EBF5D93467CE8C0D"
DATA "46618CFF7DC7BE276AC4AC04A4096A1535F451EC19331619C4BC098821C4EC371982895862902D1D4A032946843C08459068F46CC39B993CA8092B0509892233B20412B18422"
DATA "F8230F01844E5B5F973768228C417C04602A03419255C2202AA82D8446207A48A2C4ECCA667955705ACB20621F4604550CBB0099B20C5554785A57D907316205554C20661720"
DATA "805A8EB003FB7E06550C58509E0B644808A49C9810C6209A135A1583982D839A5B9B56326421610CE2D9C6F850C083274D28242C25012D24525FC1AA46961B5E408664EC483C"
DATA "50739424368B18B9DA12CA5E4AF82C5AD262FD591D424E4844651DF895554B651FE85F2F4033C0AE041E747A2D30C246171194D954588826841693B68879582784023189C4DC"
DATA "B59628B5B42E7AB7B0BAAFA98EFE4D41870A180C31B90E2B894AD587011EAD81E42411F01DA8BFA0D7CA1DF45035DE2803A8AE2A202E57D516F441EB12B4596A9DE0893A51CE"
DATA "929D44DF82D992DB1230FD20119DB9B7568985D8081C89799EA8ED8C05E0F8DCD846469EE7D4D0CCF8EC46464646C8C4C0BC67904146F0E8F4894374C830FD894D7CC6DAABD8"
DATA "97C4110804A3489459ECF02FA8D824AAF8DBB670E86092DE13210F0710803396061F5F863F5821071E783574358C0643818B7863EA2BE7F88A2584EF311430C0050C482A83A6"
DATA "B2035C32861E788558D44090D33EBE4905DDC9A2564AB646C3E812CB808F055632BE170D166CA5FD070291560C560746AF5E0AC82FA92F8466DF094BAB119317244B746A2107"
DATA "B1FCB9A9FC0655BDE0476683C0185051E0BF9821D8F152FEE61E1C0519564D06730A1E80CE294E95E2C42022A52659AC6EEE15120A81384CBC28789D8B125D1018064FCDDEA8"
DATA "4889016BD25ED1F60B194E2DA498D183E804741C04690C60D30D33E8019BA1A9EAE4E4ACE406E0DCD8752CB6497A10E5F0CD3B37D4476A17141E882BF8FE75123D52950D5B1E"
DATA "8891A0EB2C03CB53B216FD9CEB15FC5594B665051C19A108C8A76E852873BA5C83A19C2212948CFD70B98DAA1527E33A30143577A4567F897BB104DB4730DD6E89BB1C9E5B8D"
DATA "7B0CAB00BFB823FE0F112BFB8A0437880646D9F58D8B61FE76784FBA5F153988014183EA18C8AD25E710200785E5D20BFE22E8F857CAA8B7D0D87604BAA4A0BF41FE1FFFBAF1"
DATA "F0B5C38884051D403BC772F48A85EE02FFFBED2D8D8D05C6851620EB1F0FB6510E6F676FCBB60D21730DC62D202EC276EFD9DCA5FA83C1028A018CDD535E69FCA520D6A2506A"
DATA "372AD81BEC43B763381AFD841BB6DF5B68EFB6ED206692FC401ACB5EE916FC2923D4E2FD17E62127248BCB0FB7844D66C1BFFF2D940E804C0E19108A840D5BEB10A80287CD9D"
DATA "AFE811204DD60E2E022D3EF6EB07889C08413BCF72F01577AEB7F79F8D960E4A582BC2674B03D103FB46C37409E4CD9BF819770A59DB7B2B1425FB1383BD17120E177A6BDB8D"
DATA "046F485C14E0880201881A23F866B18B3A4B5ABA35692B5202543630FCD4590D805019964CF885382C5D10F47649483B41049E5CC78F9E53532220EF03EFA38E80B7E383CBFF"
DATA "C22E2C6A21FAB0B988AA7648F0F8F1A77EBBDB832724510DC13BF3751DCDAADF59501625F35779E204F00E888850BA7432FDC15E68F44878184B0D3CE066790C81783A2E70B8"
DATA "314E8248C707CBCF1C7FEC2E15CD484807F680CC0275A7ABDDD840351720739E8D14211DA1971B14C0201F4BB7E45C1BED688F577B6BF574295CB1B4A3A93F4F852920D6189F"
DATA "A8A44AFF7E1BC009A14D85875C741139775835B08B4CFB77481A5E565CAB7ABD53C798168256A2FD315D0CEA7320474696C18406FE56895F2F6BCB6DAFF32A2903F2509B8220"
DATA "1DC1EBAADE0525760133F2FF1E8C783178829F411E846843CE126317AA48D4551198097C0EE2074D5290138B5601895F17BBFD0A4F0C02C61C8C019284071AABC3E3848E50E8"
DATA "0CA4496059552091EA19051E3A5402D859FD08FEB6080EBA4D1359F652EE17888616597BC74839982E19166E3612A04CEA8EE9C030B5127FEA123DB072E681FB4207644636B3"
DATA "19C80BE9BC044F67B01BC31498DCAA2CF38CFDF7E8505312A484831C09A0758D468159895E85FF74CB1389BE6843395DE87651C6D212F5BBEE39EE74218A4801561AFB8DA746"
DATA "DBD102088D1504EBE26DE1EDCA76F68E02803839DF471AB9FE9FE9EB86B3080840A2F7C1DB6247F02E0491898651D87BAF1B7403897E568D7ED5E4DADFACD543798887FA12EA"
DATA "7721FB0CD107ED9E9B6B45E4B5A80D6FFB45E08D8E12B08A255C97D8788BC8998A417896EE5F7F6D98119A1781FAD473138A8726ADF5ADFD98084416194217223BD076E5A4AC"
DATA "BB066D9739CE8B3B47B04283FF569602F70472B853FA8D01B2DD0B75178B6C4EB3068D904AA44BF585885FDB8D5202669949546684ED0283EFE3EFB078D4C04A32D5F17414F4"
DATA "C2C1196F6D559542501A59BAEA09D81B44D310DB1492720F56EDB24875E6931C35362DFF1A057340F440496D4006EB2E734E22031BE08E25D4585F414566393AF246C4B7A98B"
DATA "CA8D719D0183C16F8E887FCED1F98D144AAC1F75E15E20C110E08D4202AAC4B47F4DCBA8FF6556E8537F59570038CEDC6FAA572BDED1FB212284CBAFD7A35CA20BA9A626B7DB"
DATA "8B1CCAABFC5725505036A02DE122B9DF4C31DB00D75AB0940A105B104308CE2BAC5E6510EA61735444690C0F84FA901B10730F35EB42061BC11353571A0B1E82BB0634DD2567"
DATA "FF0FAF7F46F02C1267103A153BFE73116E40B8C02BF7C03B56565F78865AC60C31A8B0A3A22AC4C254740FF9674B8364D2BE480AB8CF20F4B169A3665AEA6B950024ECA1FC42"
DATA "F3518A53F1308D58048D1504EDAEAAB8413BF07CE6CDB6A17E006828BD9859117E5758C2D509578B6CF2F98A4B515B324004708A13115E2A9A9C3489750B5138B76AB59AB821"
DATA "0408C23FC125A0BBFBF9066BD0303203148D99984F9BDBE1FE42188A0388422813CF044375E175AF60958BAD07A044211EFB653DF03003343A837E18946FBFD45C0574CB4E28"
DATA "80EB7B25C6462892FB64A1813E00076AF406E85C387BE16AF5496AF658F5B44683FBA2D986422A4909539EE05468E7DAA21E2590E1BCFD35588EF81C5140EB290A037524034B"
DATA "6FC9F51E10601885F70BB98704D0311A04B8C7401012E0DC0BB4BAA30F855509B813383242ED026A07F82C05A6823342F653D58721224722015402A7824D7D5582EBE336A482"
DATA "5F56858AC32640BB11C468D6F48B86FB78FF88DC7CBB67F383A60FB4290234A753EF72DD8C75C74C67D9BCA3A8A40AC00529ABF6A8191C02941A74C33BE8E0D91A5AC0C257CB"
DATA "F7A31A0E6C5DC920FD96085C08427CEF510604282CFCB18E0ADB2614FC7C20133100B7658D0D8C338DEE0859356E6A51A2DD32C097B37705328A7F09087423F2C50A70517A4C"
DATA "CF6BA1860CD7C0E2A3F0C828DA7F2F0328308A11525832A4E0859C20B457F1612990AD264D45317D0C18C457A3A148732D20CF524FC113C609069393B337B87C06B0B8771B74"
DATA "B0AC416B0D79B06D0C03C84A85DAF53BC1740FF73950E413968CEA805AF4717C30E0AFA38D037EFD5959030319ECBC20AC0CB0C40C3890B4B82A042C3888E145462C806F22B2"
DATA "70033E5DD4215DCC5CB8A90EF0E3736A085FEF7F187B80161AA485FFE748056F25FEE727754CEB1483FE0B54040F740A7C012F2F147E3B167F36DE25B8918A1D83EB453CD852"
DATA "8C6D9315275AAE3322670DC034409C85E63B0601A112F60AEBD19AC44B05B732C9857AB565D000BFB587D7BE0BFADD8A1512DC00C645E2ACE846A8002AD81D143EC080FBE1CA"
DATA "EF10D3CA24A288A5605B3AC240DCDEF8BC4AFF56070A55C88855E284D2AEEE80C3E91ED05608F6A87C1D9320E00AD80588BF15DDCD238B6845D0836304008BEDFA36D13BB8E1"
DATA "B845CC09B00B0D77668C18226B05C2B4BF031836C308CBB8C823C4CB30820D2F08600800C7EBF0994651682C761F1AEE422D5E5AAAB30D756B53D6A0518436A1CE1A231A3448"
DATA "C4DC5BDC632B2C3418949A8B558A0065097BD96DC830E300C4C3562D816A2A61CC27D03823DA225D5B0B29CC147DC5285A8B5DDAC8160C921542B7A02C6ABBE95D10E311803E"
DATA "95143709B853404936A60734A0A9C414848267A0DE804583B8A8D06B171D155B4D2BC90206719D363422EEFB5BDA3DEBB954D01150866BE5408400B5FF5B337F04017E273B5F"
DATA "047C2555C1A6E8A099BD50227704E5468AB6E70905DA802896E03B171626722E807E01328BBBD786DD37EB31316233814757C5E8827C3570320E5C06988506C2AE2ADA438ABE"
DATA "47C75F9B235C64EA2445535AF81B4235A2250D406BD439297717DDF481903D825F61617A492C68C909E41E8450F9CE34924E5B15022F200BBA3DB8407F99CCD4035E4A176E1F"
DATA "8426EB5BC67DBFC6A3AF05A3781960BB0ED1DEC1A2D063833D0D6E644F41A12F46F9CC25A2818118453B06B0D5AB13E9782983077069F520502CF66CA2F01F8BD7C1FA068934"
DATA "B8308F6BC84C1C894BCA0495C74408375E534023A8D904A2AB0B9C252B10D33847D61E9888DBF875AF37C558834F1DF8586C1ECF5401DBD8F7FF34060EBE0C5952061A0E4EA2"
DATA "B9AE74D7B576D8AB0D75D891B025AD9D2C0931593D2E6C5D593A8095135E0C0304E2C6008CE750E2484E461C5E39595E054D2A22275DC81419DA54377A1D53BB93391EDAA4A2"
DATA "D0F8FA61F1F3F71DA144A56AEAD55A17EF40E05F82D4408701E30486C1A4018111E351B0FB6E254A16057EFC516F5C8BED0383AEFC23008AF0FF401633C05BD3487C7A030A01"
DATA "8B88290CBAE44026808C5654D0F0BB2348285E8179F8FC703EDDEABDFE1185D2182679F42B51FCE34DC0C30FC110D0D6FFB09CA6C1922A3C60778B766832C103E486E1D96C80"
DATA "1DD0EF59173074658B460D5E83AAEF645B66591C84180E1336F77847AEFFB63105CD218085BD1C486DFAFF767C36D99E93E739B58C45400E90669B19A02DD14110946ED961BF"
DATA "BF5B2BC712980D4D8735D3908CF30DDFA01A00F785591B588D9EA00E977EA7FB848D647F241D8B076E141B346CB00F42338CC27F4D9EEE0D38168B47FC230C07BD28058C1BC3"
DATA "9C1E590D01DA5075B05D3DEA004E603A1690C80B4A41097E822389C2457781B0824038F3991E088501742065F67BBDF62918D224F2556E9F5BA6954D08A258F21358C8615848"
DATA "E80EE4928D734C480909420EE4400909B99221390A0AD033929CD0D668F9E0761EE2F88B0D648F0F774CAC219D369A4328CE260850907EBC8D474C5069511067215E61E09111"
DATA "980416D24404B757574D7468513C00353890E007EC2AE72D56A35EB05138013B20EF577BE34FC08D1A249881FF77DAAA1691805771B9C72A09E4B1A0C4BBE32BC06015F0F8BD"
DATA "9317D0FFAE550F992BC28BC8D1F96A415F68E21BAA6D34CD11E1096A5A2BCE5B6E3760A34E31E7720D04C377B775B1BDD010D0CED00606161D4023CF0B06C00D6D451BB682FC"
DATA "46665705665CD95C6B94564F6C8B1EAD02B1DD02D22B121FB5B7DF5DE84A3B80EB9E79018B3BFB0F8E6FB7602A0C1A3E4F047E7A0806C60C85361D766FE28C9D41AB78103DE4"
DATA "B67309470D7A2227CF929938511CA25D665206748A2E2D3CD9C219004422E84D1CB58EC845D6F440ED8942090C256D1FC24D987871205748C77F8D81493C6D5F01B951C26BD5"
DATA "D6748406991C024B77B085BE90D91BC0855B4A0A23C108EF661F2AD077190F6991CC8BF420C8F60DC860C706CCCC18EB6E5F0093E68E451ADDDDB46B7055E058F71034530C91"
DATA "8919CC1675D15010A125C31CCB5BA9614BD5111850560C2DFE1A23C49631645559546834C89FF445E883A08DA1BA0146744DD14812D66B1494FF48801A8E2B834A7F53902FB4"
DATA "7B9B187E148D266F83D2C6598DA25830C1700197E32450FB43E423348B7808890E614253F40C2826564C494B73420E578D01144A79988D2CD1520A494AD6E892071D3BD1DC01"
DATA "35125E84CD4CC7034D1C4D7184C8F7D8591E2D51C3085E83F90C2714184A538E81FA8215488582FF989AD033EAF834575375443772896D47C8DE20F715AAA7AA7EA6386A43BC"
DATA "05EE347A910F8FC2377965866DC95100509A3B85A4B964DB90D26662E4364A4530902B1988848CDD5864C707E01974CF58FB15491ADCC7FF1038C01C64386769C5836B3B5EC3"
DATA "DC1DD7D3753A061FF87C015DA5248C842E57B4660BCD320053085E3180946C2BEC9448C33AD8EBC02DEBD2504C00668BC8F07B285AF41B60C1BA647569A3D308A1C9DF750D09"
DATA "50083CC8BC870B82323171EA14CF6A3B1995242675092A2E40831510407625AB2845C216985061854906E6DB196419A85937CC13D8E6620D9814BC1C306A406496F70D9C827D"
DATA "698BFBEB488D8759198CB6FF3BF8743E568D77201E53ACE091FBB73E834EF8E71E8D7630895ED41416FCFFB68DD81C0A0AC646DC0A8066DDF8885EDE9C35046AC7CC7C5E53D9"
DATA "2B7142E2F5522553F36462890AD410AA0E1BD0C22CD5FC30F1F23C1F1C12B25BAD148830458B8AC434C958B1A9E07517DB098817CD2066323BC517CD1811FE57DF3CF51D5592"
DATA "7C1F3934BD5375A9107B1789677989040D183DC43E61B00C5ECD68B7EBAC39A3D9BF1B0440A30747EBBB8B59AE7E527C2D19C83CC030030453D939752E2270DF9BAF20840878"
DATA "673B356973B57CAD508FB633FFD8F10DFE7406BDF64403288444837C03B8045F4B9B3DAA9F74752339070D5DFF2BF026EEA004B1E5ED0DD16AF4EB0804F5EB03F667582077B0"
DATA "D041834C3A0F1603C593C193093C2093C5B23045C85DC607ECCD686FBB1C2FEB43A018FB065D78273B0DA71F4E9A655BEFE1A5F8C98508ADACBD6A06B34C3F039BB02503690D"
DATA "61BD92419A38241C0FB68DCC50C1621CA9561BB0B1ACDA55B87120246C6C3BE2033C0223EB4B0BA8FDF66C75A351ED70392B5A016ADD7050A7EE7E303C87D9C19FF95C665950"
DATA "997664F643C0137F0B6A1058F00906B81137018BDB6E02A8D26AFD1321067B6FD93C4D9908566B0D2E08A5BE03C06A57803A1E9822886DB60C3B0B12566386CAF46C317065DF"
DATA "B571499E85663A921CA8B0A4D8107D6A086AB0C1030EA1A671862580066D65D4D00D6460E3853BF8748B3EDAD82D485569AAEC4D5D94DFC64D37477B0D3283FB14111C6A1BF1"
DATA "5FC4BD5994FF45E4EB1C3018EF2FEB7623D1E8220F1D75030945DC71BA0BD07E98B28B684BEB956D8B4B6ADF561CD862B4AE25AD51A1DC6BDC5E2E6F0402CCDCA4DC802CBAD3"
DATA "58161C482FC2A00D9958C14D5081482516020838C040101060202479D00C049FE095A7FB717458602D1A8E3904B07549F1F4467667C016FAB0F67CD803962418662B0227973A"
DATA "F65A700D8324AF46EB6133F7B29DE36CB5E0DBD8AD1A1569B6ACA81ED57C67752408061BDC5065C3FD51B8BF443607216381321F24083E5DE08854B529CB17C8368C823C2C11"
DATA "10808C0CC84014448C0CC8C818481C4C0CC8C880205024C8C8808C543868C8808C0C3C6C40808C0CC87044748C0CC8C848784C7C85E0C292FD74BE3232206368300434322023"
DATA "03083830252303326034645C052120DC24FAA50A983A8AFB83C103C1E9508E068188D971A083852375478DB4597DF013C1857007A2D0A1B2153E4007F2638D620A5092C3B608"
DATA "A20C0A6880CF7E40F66A020DFFB6A021976CC1F60AA4A86087C5B62EB45D3CD00D929D6D2B8D4410EC5B9097B98AF3694C01C965933C5401580A5C32601B72605828B2A206C1"
DATA "C69C388C45172FB4A23C40803CB4F4049C012312E02AF0483C21968BE168C05BC4239EA04338B7BFCE6061B407215969970EAAEBA4596DD8F81D21018152902011C3803CB0E8"
DATA "83CEFF3F7031421C007968E36FA5DA6410834A7665348334314B6F372FD6067464CEC6C1142F0C2E0F4C56BE3DEB13CFE01282015EC7381C12032B5AFD530026D14CCA89FFF4"
DATA "022F60D3B6D0894DC8441818125D084A810303C748A8416E8416DCAF6435A172357A3658AD29B80021833DCE2F1348FC07826632D4886DE58B1412E1BF23FA8A4C1A2DB5198A"
DATA "441A2E80E1FB880D10B85BE3F41821F5881A74812668D05A8A770FBAED56EB5731851432047DDC52004A408CC1AAFC5B5557FC575BF2B0F83FD273AEB628F018521B1AA316AB"
DATA "0BB71C164303BA16B06A05E42047495F0D027075C8EFCC4A91EB5A2D7C58009CE0432A501E6E6A6064D8D4A671D02B45D00BB502E1EFB62D96E0D6A0BEC1726603E50A752C38"
DATA "33D8D817C56644E059E438B6F64B4D3851E001723AFF3E020483E077FCBE82EE2AEB298B55D48A577E103E42B58844192EC0804C182D0457C328E4290D6C0002080405E9B060"
DATA "A830BD210640B7781686709110FC0E733F4169E206AA1F53227D35D8B66A1612832002F6CE0DD8B2AF155B17106B9B53B0ECE583C702FC72CB765ED0582C8C8E2A01A4A1CD52"
DATA "E2755857EEE64788BF64F6302880741F9C404CFD608344F6121E807C3029001B047B8C3C1A9B15E630323EAAB11875E0175F956819C7F8B81014AC92DC9CC890A1A6FEC15B61"
DATA "08422D6A5E538862C25168AC674CC2967CABFD8D5303C3836604000319898DF0EBDF7DD750F0F805EB658DBDFC073BD8731E8AB8FD6EE103433C0F07FDC6070D47880792FB47"
DATA "153A1F5B388B2772DE8D8575D947D1A80799515711D668088E35DA491BBDB35D3501D8721A388B6C45B64AD85E7297C1DEFBB3672DDBD333D2D58916895604028517267B08EB"
DATA "75DD2BFE0383C3F16C2C2CB7F8E10D8302F55AA31726735D33E605E8FA08EAD1023B7B4A83E7FE1357ED0C2023398718C60E369556EB33DBEC447BA5626B4DFFF91C6BF73D5B"
DATA "23B8C1891ED6F4F45EED7DB16C5FC8BA89B510B265DBCADD50F9FBFE732117C7FBF900BAE6B109F71083C008058DDFA5FAB705C172DB53536855928D8DC451B615F86B06382B"
DATA "C1D18B8D501AE666B9827217866C3AE6EACCE8FF4C19EE2BC3DE5221E61EFE87EAB59B4E3E7C122427039DF01785E8CB3534880D612B4C33BD126E41FBA2730FDA8375972CB1"
DATA "E807043B04109B0B60750603189346666036B17746E7889612930D7E160C8ADEC1FBD8C608C856AD89CB819D346A12371C69560AFA829D8A0ACD4221015A31D88BE03E226AF8"
DATA "CD822BEB413C774F9781EB2894F83DF777B03970B526E9D403155650200166F049036383255D7A30106000150A2CA2179E50B0836D85C932794B59706C09E81F5221389FBE58"
DATA "1B5B2253F7FEFCD0FFAE825C5DE47C8955E88A5C102980616BA5A2FBC404E428EA92856C7BF7D0A8071DA553562F38F85042B1131028206E2D3A448370D70B37BB8ACA7C47DB"
DATA "72F43984DB068F78F77422FECB530F87EE00D99A760FA5C8EC1628F04978D7B57B80C116564FD441EBE65A713630A10085221DC19B053A01460FBEC3AF2EE46680280053859A"
DATA "81DD2AB63C31EBC10F62FB03F97537EBB1736AEBA18B4C18B7062D940B4AEC4405F48D6918CD2D512394A818F6760B4681358D75027DD8A5004A4057800C18633885A0253AC8"
DATA "24265E168BDF8F8C140A8930EB3C653BFD5225C16F6133A2D0C34DE847F0417CA9FB09803F1A1F1B974EC849B21CEB0312E05B570D59053FCC73FF435BC1FC7F8256EC080FAE"
DATA "5C240497AA5D15A12580763D800423AA831F480F4BBBE1BF2DE07F03F87F8D64240875555F7E54903F3D07610774323B053C04BBAA0D94DD146F8554FB6B9B5B4979F48D543D"
DATA "1111529B3836B6BB92FD4D0C6681097F3F06BBAA1BA2C5F268A946745EC6FE8FA2A92F41D9ECD9C9D9F1C4E493EEBA5E853C0B5E0D2160BA1BAD7800F8D985772917EBD4A957"
DATA "1DFF7654A034B716251674C5DDD875BF22BEDB5620E1EB227B849F9D9C6D631B2AC5BE23F1CAB897909399026BD00A3944C8497886735AC34F0E0EDB8AEAB64FDD4BEB207E2C"
DATA "2F5DD7BD660F2815598007C803F873D034D2DC5C514F185405A0FB21E2E5FAD0D3CAA9344C3DFFF876B9FDB67C7D11F3CA3D320C0A7F0BD64C47A5F76FDDDD4BC30A2EFF7B24"
DATA "BAEC0390E875970C542909C2140808998E50C003D78386AF1C5EBA378B2E814A79D8C2C106C19AADD95E03255A04B0831BB085A87098C866DD1477BADDEEB06DC21D08900626"
DATA "1D2258B322485C4F682B1A88D456EE0E59022E5B2D6311F024C7EB4D9366FD02C9F851FE40C0214D9AE40F0BD3D0777B57F655FC23C24374C70BCE63512AF21BF9DEFC643850"
DATA "C0E23128FDDC948025270B557BC982070874C286EB511023815B7657ACBD391027608BBE30F82F51B0B993B28A2A4EA6795C2A28FDC713837E8365761C05AFAA03482B3C1D9C"
DATA "1DC08B4573103057440B86A961065880218C82BA066723263B0D82081CE254CF48EBE896CE926A041E5429626E021A521D7D4E59A4A00971999BCF317807DBC753000BC9744D"
DATA "4844A9B7FF0CB741B35AB6208D49CD260AE42D8BAA55B05D0A4095DF74FFBFC7013AE772063AE3770202E63AC709C3C63AE0750B566B3515A6D1FA0A86A9EA2DDCB972DD02F7"
DATA "D902442783785E5FC9661780100CF6350B0AB7800EFF4C7D6AB942FFFF1BFFFC51C703271402E2EDEC0E28321868E26612BAD82B9C4E50A35B23B800A2188311EA08A3A305D0"
DATA "53DAD904EB7DE1E8F87E5AC9A61291C600DEA6B93464E814C0D5C5CD11976E909ED8C086D00F1DF1301D4DD73425E00735F0E2C1C67ED76D03564C5813C5C40025F0074FA0BB"
DATA "93EBD935F6B85AB3295CC6AE6B6A6E0759F4F237FE0BC41FEE86AE773558C681E16C004281F9FD3E7E46D006CFBECA82F803CADC85DEDD2C2AF19CF6C1E10A87B9101975762B"
DATA "C4B33B2744D1A7F1BAAE7BF626D8ABF19059C803DB59CAB5D7D8C113A0F20F28C49DC7764DB30BF5AA1099E5668D58FC7303B27C37F2D8B013C5EB5CDDEDF70315F60BCB3E0E"
DATA "C122554DD73D15C0C8C103C6C7104C914EE7E5015DB24535589E4040C86C1DC5EFC5C1B67748A45EEBFE87252CDB776C297068FA3CDD0858C239D0C274078B99DBFF62F168C3"
DATA "BAE9033AEB4F2C24BFA8BE6E5EA5126A6013EB3403C7DD600E50D0C1BACC9070FE9A33FC5F83C1016B767C05733A66FD823FA87D5EC9BA53EC1C3B9340CBC4CD21100659BA24"
DATA "3024E0101CBFA866E754BCB0D220D9B7C12DD160CD0BC1AFA0A8516256D0A61081EC07DFDD8FC685708EFE0AED753BB9EB0D108D80DD1F32EDD9EADEC963821A4DDFB508F7C1"
DATA "F6856115B40CF1F6C24075E65C14ED02D9FD33B4C980456B01BF275D0BF236F7DDDD4A2616F6D54CE1EBAF1CE404D960D060847FB3B5C0603EEBBEFB02C3D9ED23E49BDDBD60"
DATA "0E9B604175D27A1804DB83C321E6C30AEE2DD516FD532E6102320C772FF2B9AE2376E459140ED9EE366CD6455306954372AF5D9A6F18EDE9EBE52D3BB68DECB1D20684815882"
DATA "290FA964B3091B4A0435C6B56DD837039CAF13A4C0F55977648F0ADEDED9D9951CFC6D5BB2DB798A95CFD8E1133BD91FDB6FBFF042FCD83CDFE09E751A0BDC36F25514887C13"
DATA "DEBE8EC50863FAB8C0F801EBF1B9BAB72A28748BF4050855E512759B055276086F8C204CD468DBDD66110607E4DE6AF0CBFAF592B1807A0E05EEBFF1DFDDD79D5C8080CF0280"
DATA "E7FEB33FEB43BB3F136689EF777DDF9D5E95AD05BB394ED9E589956CBC7FB61366AF0200CA8DD0E1D0F91B2D00FED0C18AC1240FD79D7704B00D7E139C8BDA03D883C3DE2366"
DATA "6BB342002A671D17CD3FD60510AD78E5D0FDD0C58AC58A2BBB1DB0E085D0E4010AC48B1C5B6887E8013CB4C309EBF64D38DB38D43DC30684F42CBCDD8F0CE8C3DBBD6261DBAD"
DATA "05C869C106DBC8D90890C3077280B5DDDC05B43EC3512C09C04AC10EEB07084B549EB9009B203E019A1E32F68C2480BD1C7F0AC9DBDA8C4B34BD12AFDDA0183C47E946CDAB12"
DATA "AE6A34FD485ADCE189E07B7795B874E8D6DDD9234B81E20091ABD143A0CA116F85C0D1B6EB6C03C3B9F6C06C6C8C067BC3F5600B55F5A0141887776CBC8F6E7403DD0211870A"
DATA "BCFF7F89B95BDFB5443A0E8B0A0FA4C887E10B0F75EF8D6FBE0C24DB2CA9C40AA93F1DC3B101730182430110356A07A9C36A03D92CCA7447DD18A23D0E1EA8207415D8327ACC"
DATA "0F080CB808EF29168166A9C9088BFC55D9D92B7BEB1413743D6B5F58C039E4332A752118902F58B9E9FA1D5D645C93C13042558C3931F74DC1A7EEDC1D0F7CA4B8040AC78664"
DATA "EC4FBBF29CEBBF288474168F6C4603769E94EB961F51D18A1EC4E00A48768386521FEB0916B502D522D5231600057251144BECEA1DB4DB8D48E0505152B48D4BE4428BC0E637"
DATA "7D08251924786D08C95F248B5AC05814E89E4116AB724133686C9BE276AB6905BF083C773BF81AD95C03F50F8F2101750F050E0EC03FD073A7008E77592BC17478C107BC759E"
DATA "6A04057456A39B7AE8D60CE6A204BC6427CF2A5E5B89D20EDCAF6D5BBBB982975DE407ADDC07EC1A12B46D8E5005F4CA922ACCD6973C598D5FB06DD7A688B2DDDC4F0E7C0C32"
DATA "D9670B60EBA21760DCF416393B4812588F0F745132C958136F4399015CE45B2503045FB20DA5071BEB8058EBBB2981DDDE1EDEBE181DB7601B745B094A74157439ACE47E7928"
DATA "0374172DAB35C18076006A50BA854490B3DDC9C6843B87230B8C60900119A45CDCA5124276E5BE51C6B22A4A04E812628054F1F4DD1EABF023A883B0BE3D683F7231821A3642"
DATA "633B0A7E2B550FB74D0EB8EC23C81B154F059C66C537529B6877203DBF481CE6770EA8C36DD1B02F5A6306EA8FA00D1DA85397D8C1B393FBEE6F356A0C6A08EB3F278E56DD55"
DATA "F8237E5D05AE027A79123783B56E12D953AF44F81EF6C3804B7E4B80E940D9C910085173892325E75BDCA1CE2379045068C0DAAB2B691E308BD6C60B95AF106AF38AA9EB0EC4"
DATA "89F6845A091466C402527208898080843AC09453CC5821C5F28A021B5AEA45910C618F16C45733CCE2042BC51D15EF4EA159BA09F680007FDB4C2A080B0D02751CF64058D02A"
DATA "566A82DE2EFEAA1BC4AC21375874C82482E54010E8B60E60813A161906598CE705F0413EEDD7C64411288012BCC2583020142C0BE83402876263043DF5897B0405191B2BFC0B"
DATA "8348690C140518A2F8011A1CBC0C8708CE5174C7A56A030268F604011AE0D8F2B089F4A3C6C3CC82351DD0750C07AF5D0CC730EE81CDD88EC31DD8976CA890754A12560C9E0F"
DATA "7C34DA199AA22B9CFA9D2773B8E01FBC22F8DAE9A28003E220299F205AA3090A04C9060B3C189063B95EEFB88052057606FF39AE610ABAB521F775753CD8D1ACA0D6C6C50F63"
DATA "33C10C7C6F53EA8D42177641FCFB7B61B633DA911A4539453FEC9D4B0E350B203B6B9745A69E5A450C81339B81780C752ED81D8236A802675BA1104841D462176B8E5C49553F"
DATA "7B623E88ADFDFCEB5C7432590B536BB187E02C238BB63BFE3D0A58F2778BC8C8417513E7664DDD557520671C4EE41179E030D80E1ED8253D189E02896833638B4310D16A1095"
DATA "44F992F33DB0BB098D7CAB8B0671290420AD0D3CCF170E157B757232A80D884BDA6A12AD11B5143596E8047317512F89E852705057A0478B6F2596824BC110030416740B9B88"
DATA "9628E606B2EB1216A7A06F9DC0DD46101FCB627B4BD55D8EC03A030844F40A5564FE7E28D66887C4954A9E913247E021B9510F833ECF9A4454B1CE6E3C73742CA80393F42BA9"
DATA "14638444A09F6041982891E5AC6FE50B2287F008C1662358C612D0C266F933B494E4A119906E04186DD78845DB99F8045808D4427B4417063DC9417407A00A458A1E9F8AAD78"
DATA "BD5506CC0FF7889E73FFD91BC983E1908D811F2B86CF7D7690277A0C1CE08D41550B0BCECD6D4608F22B0001DF28154F0BD4D2D915DB10028F0359506D456F8F1803C12C1BDF"
DATA "B62836E8700CB8091F0803CE3B2614FCF6F9720A421C283BD372E8CEF5C021212F6AFEEE70431F8D5559A13050CC5599AC2A4EF83B501C563B89F60972816AC390F00079902C"
DATA "E5615F3754972D1350198F1C40A1FE9B083A8B4024C1E81FF7D01810B0AA82FE808324006674FE1D082B6BB9300FB9338222014B574F40B70818088139510C2064DB91BA5118"
DATA "55C0FD018C40004F384A00A07852E4CF1E1CD970F2F2E9D55F57563E4601DB5533BEEDE57D154745AEF0BB8A07F7D8F7DA83D84B14926ED3B9890E1C1C14471B183BA980E61C"
DATA "181A1840218754C01A102B63CFC91818D8295423E5A980DB10D1D91ADB4E0E799EF11C18141052016F47181B121C33DB244752010F4D79071D4F9B0AF8B075135D5E5F2980F9"
DATA "A68AFFED407315042073060FADD0D3EAC3CF9A83058A802DE84509B8756B156D1592082BB5E10F3ED4AAD19ED79FF192DCEC3090C915072F4F20CFCB07A5C2D3E0D033C0E212"
DATA "C483808885D5CB20C537E8F8F20F2CB41D56AA61881B1B18048883444B72586F74D381B1564C91E336200FB3B0C195295EDF7CEEDF41779C063418AD3CDEE9452FD12EB01ED9"
DATA "56642481F1008121DA3681C19FBB01C1A1A55B5FEB2C1D529D9C0517D8DABEF1B57FBF08F7C21575B8D95C5303C90454BE8173F9040B7570E13F4FC425BAFFF7F2682DEAC672"
DATA "0BEF5994DDC755DB52DC4A2D00F7854DE71EC6D8485B6405004F8B74003C20E8AE4C69E5FA97BED68BD103C6EC76083BF80F8294855483DC44A282D2047336986D4813158E67"
DATA "954318EA92A8B1A47025BB5F28C966C733C6A90F30750EE916CCD4E05F2B0783A9459E3C37B7F7C7120B859DC6AC01056207FF25E702730D34E9042A81EE6E00FB7F04120373"
DATA "11826D8B966D0E140808160F165BA36DB608350774651E8453B42BB0FD408E6F4EF420F4890915BBDDB65E102D30074620046E30B76F5F6B48D00FD3033A0FD90C057F1F9EEE"
DATA "F3740DE0C247100ECDEC6FB7BD7D6F2062307DB7360CE894F85A32951996F8F8F75B080672211308080059BEA56E56B3FCFCB990091B04570404B3B08903042C7C13316F2C61"
DATA "E84A10257F3168E806C8952C5DE1E127BCE00A43E084FFE0A874D52C12FD138A06880749CB124439C6168ED123AE02FDC6FE1BEBF3A583E203FF249536243D9490C1689AEE04"
DATA "039CA8BC23C1FE81BD904C0B8A460188470111B66CCB0C63130502022B8C72EC1F8D34318D3C3975510160463007B517A9CE085EB6DDD7882BCA39FFFF4E4FB966C6BA95F332"
DATA "1EB3AA1DDB5ED81F83EE24EF04FDB4FCB29630C39AA6DBAB96400348586C73365BB26C9B03030F974BD8C01613CB937AF6DA670F0F4987D30E75F17096DC4F52726881EE0760"
DATA "EF9BCD6ED7AE06034E100456205E306640A8DA6C366E5076607E70B3D9ECCE614F267F577F5F7F6777D1CD667F6F7F777F7F70059780F7B65D47D5C1803890FE7223F220AA86"
DATA "2D5B20664832DBB335C727E0DD07FCA3612818991A2027211BD43347291475EB190F15AF006D1801FFCAE041C15EDCE59F0C940B1AC00F1F254710F83B1AE17FC1EA07746630"
DATA "DF55E779B6DF666666BEE7F94EA2CB666666F26679BEE779666666DF6666A4AAC3E7668DB633BC02B5A17B4A75A39B5FDAEA053DAC2C52D5213FE8EB6D6B6ADD20202DE59B1F"
DATA "7430F13505374709D18B166604D141CC51A6D14A03C196C09FED46474975F7EFEBF1038264CFEC2BD0913F6BB06851A935098A168817C974B616A3590D6563C0E261A3488059"
DATA "8F792F02009FC16301725F24C12DBA30D082080B0D6EDA4753DCB88370DBDA16DBDBB92FBA1B5C808B23CAC12BD1CE0A9BADB9DD21EFD20374D1CB07EBD7CA45278002FF9852"
DATA "6DD1BF71EBDC0FBCC103C24FDA542DE53AF8100F45C1ED8A5FBCD83D52E9C060540826158A0A664B00BF2F013ACB74593D51142BF54617E30BD80CC3C1E3C308EDBF837F8B0A"
DATA "BFFFFEFE7E18F733CB03F003F983F161D156E0066333CFDF3804B83DBFDF9E0101817521250674D3018481E655A3EA0932C495FDA6B62A6CEAFF2C42FC3AC37436740BFF4D5D"
DATA "EA3AE3742784E474E21D101215F7DA4DD3D706CFEB91322E33C139E95CFE3C06FDFC82924380AF9BF3E405951C9BA89C34EF0F5C8236AF9C4490048141D374034C586CAF5CBA"
DATA "EF149CE0ABF003F89D08795561D01CAF9E3048F022209E29DF6A29185C57B343FD00D1E087F9087777BC0C42062F84C2C1E2BBB7833B707023CF94B7F933D2B9DD182CA40FB5"
DATA "1807C92B800D2E0FBDB3C720BFBB7C7045D0C5C7D05320D923D8D1E133081EF6E5C02BC14923CB5B2444C242AD89D71B76EA391E615DBB010D15773BCA1C2174CA7583D02047"
DATA "67EB92C24FD8B5FE6F216347F0408D4C0FF00F42C10840B8F00DD674BBD323C793C000AFBA18ECBBCD14B1E27CF823FA75141D402C506FA38F101301EC88E62E4B5FD7EBBDFC"
DATA "7BA15BC0AD38F2AE1BF7D9170775CBBD8A450CFD0D6E38070D005877A31CC7FC680000BCB05754164B13632D215E72B95C907E065E77C8C0825B40785D58A71B3B849DF0BF17"
DATA "41FF000F18BDB0430610800FE0C3853827830743F07BCE3EE9DEEF47073F386045083201CA2DD1C1272033B43F03ED61DD0EA7FF170B1362FB6C03B3FFFFCD142A91556E6B6E"
DATA "6F776E20657863657074696F6E1F1EF6FF90B462616420616C6C6F63611CFC0008FE7FC21B72726179206E6577206C656E670A2E638EBB2350166B0C15748EE803A80961FFED"
DATA "C3794D61696C496E766F6B65642E0F1C01C4FE52657475726E10FDCBDE9CCDC003032005931911FFBF35DDB2A403B8F421B3306100640076006100700069F7C22CF200330032"
DATA "0DAA6D0073054DF7775D770B6E0763006F00720065116662995B887509721F0A31050336B7ADB23B1579110F68C6C69AC9393230776B536E5BF825EB056C8B0045761A74E385"
DATA "76607F6769737465721353F70A2DCC92F0666F726D5C17947285EDB1812D135772690F546C0E1F84EF6E736616011B466C73419E816D03F627134640650F32610BDB476956C6"
DATA "751353DBD6821C028B62691169F6DBDAEE7A65436C69630A2263994578B59AA6E90EB5A003ACB4C0CC6DB6A669D8E4F423B6B6086B2E4DD307101C28B24C3403A6699AA63C44"
DATA "484C509AA6699A54585C606C70699AA66974787C8084A6699AA6888C9094989AA6699A9CA0A4A8ACB0699AA669B4B8BCC0C4A6699AA6C8CCD0D4D897A6699ADCE0E4E8F4B700"
DATA "344DD33408142C384CD2344DD36C8CACCCECA6699AE6B8102C50709897A6699AB4C4C8D0E0B904344DD3340C18284464692E4DD38CB4DCBA0824A1699AA6486C98C4E0439BA6"
DATA "B93DBAF003BB042034545F6E87A5A55F81733528990B63643394AD15AC361370B913A548B73142640B6C9BD8B2CD1A510C2366740BBF59C37076E3820D33636CFB577A927265"
DATA "616200537472363437F16B8DB272651A2F13756ED71BD6D42A67B50015880AB3B1D5BE47208D10745B3D724066613E3EFD3CEB8DCBAE0B8721035B5D6F70C91D40F7B9617B2F"
DATA "2D232A0E2B8F75CF750B2D030B03261B2A002FF7BAD33525033C3F3E57077467814D2C2829897E337CA633DDEE347C7C4F3D032DCCD67C9B2F253D8B3D3D233DDFADBDE9035E"
DATA "60766674E8AE27000B62DBDB21200809607479A96FA97DA0BD66120B0A6C20F0B270986DBD63206775FF641702CE70382B000B7697011313267487755C1560661642730B7328"
DATA "1D1F0F94AD0D2BFD756C7420636E180B6C64CD598173188B73613FB812360B5F3E30025BF6225F207F1E16D82C591FBA45DBE80ADC236972A8FD6449708CB7D5B541306D9720"
DATA "BC70DF64B350F6656820822386E656D90B1F864717607B08E17079286075649272DF9A38C44F8E1548035254544985256109BBED0F497E2CB050CF5B5DD2C7767B0A376F6D5C"
DATA "201B730065B325BC730C253EDEB2B6B21B411D4B4A282D153E4767443C251C463627406384157608254F6BCB6D84AD2D7B64796D6E4B061DEE69201E6622D6A20D7BDF1B2A42"
DATA "1DD923D9B297215B9012466057608C0B24A445B657AF935C140A0376B4B6A6B13E597F20222220B354E7EF604BDB2044C163CA706C20428FD82E60DB436C057319ED20281B0E"
DATA "E60E4D4107300E48695CC82EE05A4768794E1FDCEE31363C70234F626ABE204C9FB614BDC11C1420731D074F9E3C795C1A601B641F6C13E4C9932774217C0E840D9E3C79F28C"
DATA "0F94109C05A41EC993274FAC12B020B40C3C79F2E4B80BC015C81CD01993274F9ED811E018E8163C79E4C9F017F822BD002304241A274F9E08250C2614286F61A3252A707400"
DATA "9A670388D1D2A1313D496E3BEEAC105BC67307AF0F6118612EE6620718071807BDF7CEDF323771727426221E0CDA182C6F69CB665C5CE7F36F6966DE73816D6F64666C64AE15"
DATA "4E6E185F635FA68E457407F9B966201F6672793003315BFBBAD26EA862136E1B6366090628429A1D33400669B60B1D0496066490668D088E8F400664409091724006649293B4"
DATA "029AD0805CB50CC7C3E8D1291BBFB538144C6D012E2512146B3436DD7E7245A750727698FC3CFBDED8003836073A0F4888E5F2ACB9493537033ECD3F259ADB60CD54B5C62B77"
DATA "03447EAAEC59D35C563C92BE2F50B059E6C96F360F0B3880382F1E3D1E9D158B437F74CD378C83070418D3050B3648D30D0607E3EF32D820DF07090A1B0BC1BEF702573B070F"
DATA "575F906EB0101311031217210C32D820350F414336D86083503352175307D860830D575F597B6C17D2344D376DAB20701C72D860DF0BC72F80B3810760830C36821F83848F20"
DATA "8334CD91299EA1830D32D8A46FA7B79FCE4C0EC2601FD70B18070C3872066F7FEF7F678775B42507108D0113307604E83EC048039067C0D0031D019AE6C11878C477C200682E"
DATA "4DD303407CB8C3086016A04500AB229BA44B2140670B508F15BC998EEE70136F9B6519720075230136D7741F156599BA2D95009B47613D65DD5196C2413F6C09635937D67425"
DATA "6C7A4B69116E47E62D55323205620073D8CA80B16CA56543E7AEFBDC01700761651F7347130698B168FF61CF3260EC5B253F721567BB0039900B307315CA46821B6613253F96"
DATA "B26DB6110B74793BDF84D85578B9EFB73263D94B25673F673BCC04EE751FB123641D6F8584AC778B3B25A13B6C4F753D4B790F26618CED912966CB63FB73A4AC1BC05765C574"
DATA "57EB1E421645EF61496B05B0F766AF67BB75C7C5570F736129F164A11022EBBA6F53620578476C25BD8139FB354F158418B6351B78BD40F6AB110700DF686AA92DBC432F7243"
DATA "50C1B686B6066BF9496F072301B67AB003074C434D8753830F257BC1AD17FE657B767BA34EA265546F23494455C4E803D8DC4D97C7C5C50C6AB5A34A2C708811E77AD9F94E16"
DATA "818F43CFD54BF71721B6237054F35375DD4DAF76031662543B57FF5468D9F16BD1DA467917941B646175EF7BAF061F07237308276EDE0BF69D09002F720A3709EC62B0F63B14"
DATA "134AC34665BAED422B95D12B4170034D164AB0FC8DE67303114175670053654FD7A8C44B844E6F767D432F53BCAFA3D079337208673BE4DCA37D073F0C3FB5DF73EF6517431F"
DATA "47757342FB5EDCE24BCB6D62CE536F09277BC3DC57125F0B414DDDD8DF6C03504D4D2F64642F794764002CF85D7BCD204D2008141648483A6D6D3AF778A7B35D53078F13FBB6"
DATA "58F7B90F885705640FA575B2C73B1D07472F4137C25EEC40D1663F0FEC2CD9594773114F6E13C9969D255B7211672E7BB3650F6F25134AAF7BDD67AB464D627B0F72FF60DF2C"
DATA "02790F294ADBE85EF7BE076C1F07675337701D9AEE744FFFBB4E764BC9C6267B315F75557967B922D9B272117367EC307B87776963734177BDD36C962F7B6171EC15B386838B"
DATA "EB8F039B259B6F0F97219FBBB061A313418D075073CDDD204D012F00642F7D7F7B2EBE370D012CF91F01BBB397EC2011252948013A006B560C9A6D3ABD672D9AEE61EE55B300"
DATA "C518031C20699AA66924282C3034A66B9AA63C444C582F649AA6699A6C787C808488699AA6698C9094989CA6699AA6A0A4A8B0BC699A6E90C4CC03D4DCE4D33497A6F0F8C604"
DATA "10144E06354D182438ABC644699AA6E9034C545C646CA6699AA6747C8C9CACCDA5699AC0D4E4F8C70008344DD3341018202830D7344DD338404850582F7483344D687C889403"
DATA "A0D2344DD3ACBCD0E0F4A6699AE6C80810182C540600108A685320C92417E201282099C83A56C91001844026640010810664086401108258086440023BFF5495712002808182"
DATA "83848586FFFFFFFF8788898A8B8C8D8E8F909192939495969798999A9B9C9D9E9FA0A1A2A3A4A5A6FFFFFFFFA7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBFC0"
DATA "C1C2C3C4C5C6FFFFFFFFC7C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDFE0E1E2E3E4E5E645FFFFFFE7E8E9EAEBECEDEEEFF0F1F2F3F4F5F6F7F8F9FAFBFCFDFE"
DATA "FFFFFF4B2F02030405060708090A0B0C0D0E0F101112131415161718191AFFFFFFFF1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393AFEBF44FF"
DATA "3B3C3D3E3F406162F4666768696A6B6C6D6E6F707155FF162D5645767778797A5B5C657F856D13601F7B7C7D7E7FFFA72A84517F4142DC22F8FF434445464748494A4B4C4D4E"
DATA "4F9753546CC25B45B658595A7F1F4800082B7F93DFA933BBD76F07080379F2E4C91004180528063007274F9E3C38084009480A50F2E4C9930B580C600D680E4F9E3C79700F78"
DATA "1080118812E4C9932790139814A0159E3C79F2A816B018B819C01AC993274FC81BD01CD81D3C79F2E4E01EE81FF020F821C993278FD80022082310243C79F2E4182520262827"
DATA "302993274F9E382A402B482C79F2E4C9502D582F60366837274F9E3C70387839803E88F2E4C9933F90409841A0434F9E3C79A844B046B847C049E4C99327C84AD04BD84E9E3C"
DATA "79F2E04FE850F056F857E4C99347D9005A0865107FCF9EFC7CB2500104D9180224030F3004F6ECC923C50C053C060748070F278F3C7954086009C8680B6CF6E4C9B30C07780D"
DATA "840E900F67278F3C799C10A811C4E81200F2E4D99313B41407C015CC164F9E3C79D818E419F01AFC1BF2E4C923DA081C141D201E4F9E3C792C1F382044215022E4C993275C23"
DATA "682474259E3C79F280268C279829A42AC993274FB02BBC2CC82D1E79F2E4E02FEC32F834DB0435C993274F10361C3728383C79F2E43439403A4C3B583E93274F9E643F70407C"
DATA "4179F2E4C988439444AC45B846274F9E3CC447D049DC4AE86CA3C8934BF44CFE4E079E3C79F20C4F185024523056C993274F3C57485A58653E79F2E4686B786C8881940108B3"
DATA "253847A00487070F79F2E4D9AC0907B80AC40CD010234F9E3CDC13E814F416DD79F2E4C9001A0C1D242C303B274F9E3C483E5443606B7879F2E4C8010C88049407A009274F9E"
DATA "3CAC0AB80CC41AD0F2F3C9933BE86BF40110DE04044F9E3C7910071C09280A340CF2C99327401A4C3B5801144F9E3C396804740780098C0AE4C99327980CA41AB03B4F9E1CF9"
DATA "C80118D809E40AF00CF9E49127FC1ADF083B20011C274F9E1C30093C0A481A547972E4933B6C01207C09880A93239F3C943BA00124B0091CF9E4C9BC0AC83BD40128E409939F"
DATA "4F9EF00AFC012CE008093C39F2C9140A2001302C09380AC993239F44013450095C0A473E39F2680138740A80013C8C0AF9E4C827980140A40AB00A44E491471EBC0A48C80A4C"
DATA "D40A50039E1C79E0047CEC1AFC61FFF10E643E620067D30040B02D182346531738672F78C7410765CC2667A7C1076E27D9D9EC157F075F682F8AC9F782AD2769F788C9F75757"
DATA "6A8F57980C36C86E6E0F702F987C27EF17725172E6CE665767734107719C3DE80C764107726687988C75270F5992C1CE3762D7736F830C36D86C476CAF667660DDF962E77F79"
DATA "157A379B75B3B3976D571766DF3731F91E344D3F689B9DCD5E7F1F2F6B4F150C7616AC779F57747F70987C87980F0F74126667870D3F6E5717B42AD8591F6D17953D03BD246F"
DATA "71D729347C3C0333E9172DFB417533EE661B0B4200471F0B452FF631C31913235A37171923631B7C4B0B65451FB7C7D98A5F47130B4600EE7D9191497217682F15C1E8188C4C"
DATA "1F2D755523668C8C7D17530B74541B7423DDE92F4E0B624F1770C6F7888C5027B3522B91B1916E2352725F52F81E91B168834837EF4B45BAD3CD3B474117767CCF8CF4CB7413"
DATA "540B3B54C8D8F7884B774BA76419A461C64453435565CD18191B59536C495FC5BA37D25F456C6B75560B1EDE23F2EF4C6B534376E39BE14656F173A74D77748AF7050B5A35EF"
DATA "DB2309878F75AF8BA74D6223DD3B1F9B5A78D7B04792CF0B7A0075B30B648487C7B7C745BB6F63235F644F8F496DB34DBE09273A05971773B1E78346596F6B5A0BBE178C9179"
DATA "47E70B5F7584474AC6CB55FBBB64A7D93B62BF770B0B6EC961A70F17740BECB25392651BB36C0B1B90C906723B736D2F49DD1B194D63B3B142430D9B94845B47319274B6214F"
DATA "F55357EA6667F445A171E5474F779884C1E7736B6D534748D2205D5A93615157E1B0091C936F87655F495B920658571545334F6FD22C2F3317336E16E42120B350B1D3A49070"
DATA "507703B77AC52E8C6743E347E13B24792765EF6B4ECBDAB265212FFF2F32F8DEAC01E70D477B7BB1016B484B419FF30BDF9B90EC55F37BF35D419BAD2C64C39FC37BB26ED937"
DATA "F5457BF1597B36D8645B3F477B4C6F6E636B403E4B7B470054484F2634CC264287056A65F2645DCB63155A634D004FD984240349F76367CC82C043379FF7737696126663A36F"
DATA "53D3EC8C60134DAFEF455713BE179B501757234337B6944D615761C7F94EF6066412135A44254BC85E4A58834BA34DF264DB314D4B4A004D56971DDE8B25330DB9335964B249"
DATA "781B93427F43302925DD336E89933D969C634205234A4CC2F7623F23E354874163C026E32742FB578B1B6CB20143234B176E5F61B2011B489F4C23418FE47BB101559B179B48"
DATA "6E09970517516723B6645B924FD7560B394E4293BDC90B4EFD4752D32F9BF012D9A700B250F90B4E8242CB2C7BE82871FCFCFC1C0000E834D8E840DAE84CB1FCFCFCFCE858A0"
DATA "E8648FE870CFE87CD5FCFCFCFCE888D2E894A9E8A0B9E8ACC4FCFCFCFCE8B8DCE8C443E8D0CCE8DCBFF3179CFCE8E8C829D3E8F49BC90F71F2E90C6B21E3E924639F1FE2D901"
DATA "0F3044FBE93C7DE94847FE8893B70213E9604528049F233F3FE96C47E978873005E9847EFE829348066BE990A2E99C914E7E7E7EE9A849E9B4B3E9C0AB41C49327CF3FCC8B40"
DATA "07DC4A9F9F9F63934808E9E8A3E9F4CDEA009F9F9F9FACEA0CC9EA1892EA24BAEA309F9F9F9FC5EA3CB4EA48D6EA54D0EA60CF919F9F4BEA6CC0EA78D35009EACFCFCFCF84D1"
DATA "EA90DDEA9CD7EAA8CAEACFCFCFCFB4B5EAC0C1EACCD4EAD8A4EACFCFCFCFE4ADEAF0DFEAFC93EB08E0EBCFCFCFCF14BBEB20CEEB2CE1EB38DBEBE7C8CFCF44DEEB50D9EB5CC6"
DATA "202371F273E4EB6865582AEB746C267FC4C94F83EB80680A73EB8C4C9CFC14272E9BEB98730BF3F3F34783EBA494EBB0A5EBBCAE39F2F3F3EBC84DEBD4B6EBE0BCF83EE4A738"
DATA "F9EBEC8837EBEBF87F8A273FE20C83EC04802F3F3F47FE1BEC1074C818EC1CAFEC285A3CF911270DB3EC3448285F71F253ABEC406A1F5BEC64E4E7C84C61780EEC585080A738"
DATA "F979EC6495EC7051103B39F273E4EC7C52702DEC88729031E4AF38F9EC94783A93ECA082FE8A93E2112B3F2BECAC89233F477EECBC539832ECC87930CFCF919F25ECD4672824"
DATA "ECE066ECE4E7E7C8EC8E602BECF86DED0483F939F273F03DED1086E03BED1C84E7E7073A305BED289DED3477F373E4E7ED4075ED4C559812ED58965F71F2F3ED6454ED709713"
DATA "53ED273FD0C97C8D3673ED887E14ECC993670F9456B015A057079E3D79F2AC98B88CC89F2FD8A84005264FB8160074F2579CAB1793EDF4593CCFCFCF0FD3EE0085EE0CA7EE18"
DATA "76EE273FD0C9249C199BEE305B22FCFCFC414BEE3C64EE48BEEE58C3FCFCFCFCEE68B0EE78B8EE88CBEE98C77E7E7E8ED81AEEA85CE0FCE3EEB4C24E7E7E7EEECCBDEEE4A6EE"
DATA "FC991B1CF9F9814BEF149AEF205DA033F2039DFCEF2C7A40A3EF388A0F3AF939C838EF488039ABF2F373E4EF5481E81CEF605EEF6C6ED0C90F741DFBEF785F35FC41277FB3EF"
DATA "847C20D3EF9062274F9E9D1E1F9C60A834A8F6E4C9B39E17C07B4027D86907278F3C79E46FF003F000E210F2E4C993901CA128B234AA18023C7940464C700BDB868483E98F05"
DATA "650B244FB625A1680B64007A926DC9B621670B8D710BD906C996F16F0BC5770B36C9803C6C0062796D770199AC5B396D1771135A96B0730B3BC9D9A32067B379FD0568C296D0"
DATA "639F176CE09D01CB03BB6253C40478B30B0583211BF90E1B1773613B58F0E2052F852F10E94E77637700EF675E92EA5E3B056B0F3F377B04C30B1F0B05CB5C44B20B790B46B8"
DATA "4B8075636D059BB149E80B63728B6127B297EC7B0BAB7A0BA50BD62D99E462675B65470FC8244F6A006D6E70006860768824A90B6EC9618FB36B7A0B0C3B24A177A3A10B65DF"
DATA "CC41AD0B8F6C0B965C96B0172F64935CF608DB0B73675BB22DC90074A56E0BC97811C9B6640B15690B900199EC610B65722C522419796917BE53B0E4757D9B74054946466575"
DATA "7833E28DDB69531F0591ACDE2C6305A7B9EC30EC850BAF0B689B31EC25050B130B243B813B6D25AF7766C48C1727BB7FCB5EF00A7BCF1746BC646777610B05A37087106F0583"
DATA "61610D23DE84FB05BBCD6693E00587A70B101FB3E205F34B7009E122865FFB238225C5BA037A0B63D8374BF6630D0F27720BBC61C4C879673B0578C10B4653055710EF11C9AF"
DATA "0B05C8C8F7860355176E6E5B3663C972970B0529DE10A279F3058BF0820934B16F40BE97ECB30B05236E0C7B2469730F6D6B1D16BC53C7059F622D09DEECE30B05C3B219CB26"
DATA "290FFD0F5EB062C6B9030540BA372B030577739BCD7841237F0BA78C7C2FD90B050B6B6B5B068C8C6C69DB3172365B360F351F6A4B3624436A6E7D0F6F8C09397371676C0BD9"
DATA "42201997BF17EC7B2B81831769702FB2237B09172F767941BACB5E0BFB770B6B80342C8379694774EF99CBCC740B68050B78116859FF3F051368C2A4D78F33E0B991B1752375"
DATA "70110BB06529F9B37517C3C8D808B427768378D3E904B377038B99B20999B00F746E0BCC04257968006BC90BA02DC9363F673B77142D7B433B670074D8219BFB00F03F07335E"
DATA "D96C52440700FF0701249BC016801F3E9000265F67C0DB3FDEB0DFC30710F8178F42073BFBFF27EB087F07789F501344D33F58B3121F31EF1F3D578DB0650B00BFC80B7B81B5"
DATA "304307F0FFFFFF21397F01F9CE97C6148935403D812964099308C0FFFFFFFF5584356A80C925C0D23596DC026AFC3FF799187E9FAB164035B177DCF27AF2BF01DAC8FE08412E"
DATA "BF6C7A5A77CB9C36ECFFD9D5DCA7D7B9856671B10D40CB09403DD8FFF736430C9819F695FD39E03F03B75F358B00009E80E10383EAB709BB34EF82115FC04335C242C261FF68"
DATA "21A2DA0FC9FF3F09FE0561F2F7A518080408080300040C2F8CE861277F02353E40A3C9860324BD2B98C011C038E49840003716A2291CE18B55C324D5FF27107BE40AA8037C3F"
DATA "1BF7512D3805FFF6FF5D3DDEB69D578B3F0530FBFE096B380F8096DEAE70943F96FFEFFE1DE1910C78FC391F3E8E2EDA9A3F1A706E9ED11B35C06FEA8DA07FADA03F1309512A"
DATA "1BFFCDFF771F63C6F7FAA33F3FF581F1623608EF591E17A73FDB54CF97FFEF6E33BD163FC702903EAA3F86D3D0C857D22140C3FBFFE6FF2D3332AD3F1F44D9F8DB7AA0D67011"
DATA "28B03F7650AF288BF34FFF37FFBF60F1EC1F9CB13FD455531E3FE03E65FD1B15B33F95678C04807FF7FFDDE2371FC5802793B43FF3A562CDACC42FAFE95E7305B63F9F77FFDF"
DATA "FD7DA123CFC3174F4A8D776BB73F7A6EA012E8031C3FE44E0BBFF0BBFFD6B83F824C4ECCE500CF402422B433BAA357673470F1FFEDFFBB363FA754B695BB3FC74E76245E0E29"
DATA "4FE0E90226EABC3FCBBBFF5FFECB2E8229D1EB3C6CC1B442BE3FE94D8DF30FE5257F6AB1FCFFE5FF058DBF3FA777B7A2A58E2A203CC59B6DC03F45FAE1EE8D8132E5B7FF3F4F"
DATA "AC3E0DC13FAEF083CB458A1E0FD074153FB8B7FF6FFED4FF93F1190B014F05FE51C23FC077284009ACFE5FE0F4BFF0F2FF1C30F7C23F41631A0DC7F53050790F7EC33F64721A"
DATA "9BFFEFB679741FCFB4537429C43F344BBCC509CE3EFEFAFFBFFDDB24CA0F5168E64243202E7F3009127562C53F2D17AAB3ECDFDFFCDB9B30F61A1AF20F13613E2D1BEF3F9016"
DATA "A28DC6E6FF6FFF3FD09996FC2C94ED6F00286C5820C73FCD544062A8203DC2EFFEF61CFF95B40FC53391682C01DFA0CE66A23FC84FFB97DFFE238786C1C6200FF0560C0ECCDF"
DATA "A0CFA1B4E336BF6BEFFEBFE7EFDF59C93FE5E0FF7A0220248FD2471FE90F0A7FE3777CF26C0E331F40038BA46ECACF5B2BB9ACEB33EDBBFF773F52C5B700CB3F73AA644C69F4"
DATA "6F70F97CE6880F77FFEFFE72A0782223FF322F2EBAE306CC3F7CBD55CD15CB0F006CD4FFBFFCCB9D9172ACE69446B60E901361FB11CD3F0B96AE91DB34DFFDE5971A10FDAB59"
DATA "9F736CD7BC237B9F607E523D16CDFFBBFFCE3FE4932EF2699D31BF02DC2C9ACE3F87F18190F5EB90BDFBADF19476581F8B0717EAEBAF077FDB1F8099FEF6DDBF0F6896F2F77D"
DATA "7322CF09455B0AD0AF2553235B6B1F7EFB97DF0FE8FB378048C612B9B9936A1B1FA8215631877FF9E55FAEF3BF7DDA6132B86A1D71C632C1308D4AE9EFF8CB9B35D2CDD9FF80"
DATA "9DF1F60E35EF78C2BE2F6FDF35FE40D13F8BBA22421A8F906919977A0F995C2DDDBFFCF22179F22158AC307AB57E84FF623ECF3D4F3AFFDFFEED15DBF00FDF0E0C232E58274F"
DATA "48424F0E26D23FF91FA428105FFEEDCD7E1511A662620F12190C2E1AB012D843C071557EF9979879379EAC69392B800B76C1D5FAE56FBFF80FBEDEEA3A9F30BBA7B30CD3D8B6"
DATA "19999212182060CFBFFF215FC8D90751F0E8DA5FC80B39E080C01FA0BED9C80B3921805D50030B39215F20A9D8E055792127E428FFD760AF985F215FC80BD00F80C3D65FC80B"
DATA "39A87AD03170ECD5C80B392110A7286509F9425E4023D0E4D4F2425EC860A6686BF82C424EC81778F5D380BABC9017F20083F84E78179013F28570E3D2E0B22FE485BCD87E48"
DATA "4EB81DE4847C21A0F0D188C30B79212F70965869F9425EC8B83FA01200E9D0425EC809D8C23899BC9017F210737049C026902FE4859800E0B4CF2FE4859C806F202AC0E4E485"
DATA "9C90CE609F005A847C212F901B30D6CD79212FE4C0975059E01A2127E40B60E3CCF0A45FC80B79706D002F80F7CB1721392100C0ED92219020085CDE1A4581BD1BFCA0031E59"
DATA "4846B12B17ACB2EE85DC1EFB80FB9003981F3BF996D18B234080477C8F7A21332223029003D29DD84BE49001905D482EC80FFC141CB2EED9C7FC2403344FC8029A213981FC14"
DATA "F0646C59F7C2E3FC74037C1F47A9E9640933902907324BCF377A85EC31455457308696EF51FF0E04882B058ABB05A402202F2888515076A360A3EF71566961435224228D58D4"
DATA "8503222046692B50A884B57D3B3C14A4CC043439FE7FC866B73A022B004D6963726F736F66742E6D897AEB2C500A76696442131BED66FFFF1A73504FCF898247B3E0DCE8C904"
DATA "76BAF6B45F02CB6E29C06642740F60122727CC78909E246D6EAF242E8CDD026849FA243513C130F71BA01A2E30306366670B0F853DD5DD74245843620813E63921CF5A0C4941"
DATA "10BB90EF920C43271C5A13D23C27E42050412408D912F25D58272C1341848D2DA4304F3413E6B990E75441385A4064793BDD2C4AFF720F6C0B01013D9BFC3D2472C3A00C0113"
DATA "73788F4B9AEE0617B0107A27E742BA08521777319AE7C2DC370D5B17326301259BE7423964F802FC93BBB700646267DB5C1001727463244941D8D8848D60135ADB6427B3849D"
DATA "1C54681327F98D749B701C0467787827901419BBB3674465ECD40F280027E3926E2CB7FC1314334F97B103F9101501341316A004CC6DC62436FE1390074138DBF7126F274B78"
DATA "76670434DD0828FB08624D40EE6CFB6C1F8867664573A388133542E0924C7922969DCF04C807D00F5CC981EC1F0B5FD4DA0EAC7B850CBC03DB1FD8EB5977420FFAF90D471419"
DATA "8C02BB6307FC020701080324104BC091CB4A8B0C137B2F6CCA968F1BED53015032D8B0930360573BC8BE17D900B4EF2DBD1FE475839D423086076E037EF2227B8547343F6734"
DATA "902B84EE1539A503A957B217D9180CA51F3FB13F221BCA86121F5DBF8BEC45F6509C3F4BAFFFE4941DC85686B43F5A9F9217D98B57F21F5E095372202F61E1CC68D2293990B8"
DATA "C46BDD5F91BD425E6BB06CB98791F4227970327724BF85BC48787D4FA789F72A8BEA7A8FF9750CAC041408A300C00928597598C02F296697A3B119BF44490232014D57FEFF43"
DATA "C8FD38AB90EC5E22C0B244A5DDFD716A222A15480222493B22060250E7D96C5216EF022B00C152C854108148201861002C14564022171446C08406B7DF27008CF7010204082F"
DATA "A49E1CE497036082798221A6DFA1A59BE7CF4F819FE0FC407E80FCA8C1A3E4EC11C2DAA3CC81FE07400619021BB52F41B6BD42FEEF5FCFA2E4A21A00E5A2E8A25B7EA192DFEE"
DATA "8E09510503DA5EDA5F5FDA6ADA32B321B7BFD3D8DEE0F939317E0002E94C26174215D2AA10AE8C7A3200CAE001520104F608A39316700FED25274B171730CD6087A053C8CBCE"
DATA "E0C8780015B00203AC81AB431A7910493744023701EB8810C8029F2EF7A3ACBBA42E24B0D80384355DB07F002F28DC03FD396570FEF3B23C2E3F415610F42C10975F40084409"
DATA "BBE340401BCB207A016C1B37B0596479B35F5F265F0ADA05B4F25F690AC288D69C18791410D82A03AFA000197543BA66D92C5A3748152F0737B627076980B060BE66039297CD"
DATA "B2693CAA547E7748C6647372DB2CB5254F3BCD4E375C36CB65355988583A0348CA51BAE672B92D73906C586D6E034CA6D9BA5C068EA39BF23649410669BA4C074E50570606E9"
DATA "9A5D5423555A3A9AA6699A5B0A130D6451582B284069005910152D6A282A5CD698A402CA08B0805482631F284049641353798E887FABA26D54696D654173FE9355417B091845"
DATA "53F6BF73DB4C6920482F147344656275676765725040A8DBDFDC734812556E68616E6435644565DB5CB0AE434F725A5351F05B611C777461780D406C87703A575A6BED3322CC"
DATA "6F72466B175FD8F62E59622B4D6F647546484CB6051BD857C934125455DB2ED9F66D696E386511244C61B9458A08586B27524485CA7D41E1736E8B7CDB76EFB76BA0466C7573"
DATA "68E96F52610665B1108038240A50F1BDDD2E418E537074436F75A65400F12600C309C440BA25A90C5380DB8B00D3056D627263FF9EA9E79BB541646472B94CDCB560856F6C1C"
DATA "86A752746C4DC8562E497769D4534576C185ECC0943E3F766515B217055344B716846545904669DBAD8DA57C4D0E2942793A54982BB40BA6696440D178095BB6646D131E7748"
DATA "70DD56C28437090BAA6109103C75E6FADC0ACD101D5046535061B0C71E6B5B33414350074F454D09418B3D5A06290AF69DB9AD51C2BC6D5444734D4860CF4579185D6C3618EF"
DATA "7A967A64E10D67A52A46F428666F46566ADD6D6D1A4C3C0E10F9EC9BCD4C593057F353697A48D860075265F553631EEE9D80F465A567C6600BFF0A42756666BB73626EF6CEB0"
DATA "ECB512E80D889E8DC2E19353506F69EA909D182C61E5436C6F5930574C6E7678E363442C2AE56DA3D1CD781B517F4E50038FC21710A86E0EB57A45207A257D1F408FD1CE0846"
DATA "161A303336FBFFFF8F28288D39F0F4000FF0A801F004030F0F252225480808C408330AFFBF4140BD3C24170827095F2F1017111105FFFFFFFF19050D4D1D0A0E12153ED93383"
DATA "135EB0314F13130C101126150706120A610D27FFFFFFFF08193A1B0C0F090D2F081106060C062331AB1F0A110C0905260525091D511A06DBFFF6B71902102617311D16431B0B"
DATA "8F0908470F07362D0B2B27DFFF090F0B291E090B07200600070839FFFBBFBD060A0A1000091016171B2310182B2604220E6A810812FF6D6BFF5128A6531378F02CF7723C9D08"
DATA "2A1C0F0C0E22105A5996ED0505360239303FB9FFDF9CDC03240C2730080B0D16120C260CF0170131EFDEDCFF151A1A0E06151C120B158EA61C200EC6120513655B55FCFF0C78"
DATA "1A0971F03A011B161608F0591101BFFDB7FF118734271A2D121C24B661F034011637300F1B17070C1305FFFFFF6F54116A0712094812080A0911121B2C073305F02601182D1B"
DATA "41050A05FDDBFFFF0B0B1451A4130F21590B4F184A96177E44129C0D0C19133D0C0BBFFDF6B68806010E3810412005211D2E783E06876D06B7C2858538136197130A48A40818"
DATA "FFBFFBEDF0C8018F3C192D070B991B07095031304BF0FC00147CB9076FEDB7DB281A7D3511F90B3611290908AF0D0A22ED7CD8B911ECFF1D080E2719DB3F32646F0F1B0A1C05"
DATA "1E21101C34245D686DE11C1F231115A60E550F24866DFBBF7417EE0A0D3312301D0B526E811B4B88DBFF17DA1A0F128458381BF014022D300C12443C670DFFB7C2FF04060419"
DATA "0B1B373613921893F30023262287070A1639E10BEDF6301B3B37E4235A81BA050E2434ACFFBFDD7D271E0B7D450D410D0017C77D0918122D2E349B36550AC6FFDBED230A3D5A"
DATA "0E0CA5101517231B0D0E0E0B161425FFFFFFFF60238C4DD8692A2F6639162178477F2D224689125B5486F0FA00B3065F06A2FCFFDFDA1A4032E029071C0717163B0750144E14"
DATA "DB1F05ED2107BF01BB2D8D0D6E7D12002104F04DF17FFB8D01C71511861640E8308C1F39270B1077371FFFDF36BE7E1F1E6F29727E031C892E311C331D227F5CA06FFFFF85FF"
DATA "0A4E43406B1A0D302411124819841509094A0A2AA3E90F1F186B6AFCEDBB08001E08620C14AE20472A081D10E57DFBBF512B4142371D140B4D8867B5741155F001016FBFB02D"
DATA "0A080266F50609422B252A131F2B7FE1FFEE18450C07248067339E165A3D0A1B691506113E615B6EFBFFFFFF1F31F0090205121E1406AC1DF094011CD2063E131E0EF0AE0137"
DATA "0705040019C0FE77564505F06602F06201176A59966D7BAA1110080C02AC181455D8DF6E1C18044C1D700104003517487EF0D80508D304E4E720834D080C08F09C012B90BF01"
DATA "98ACF09403645B83900C8C080080926D55E50ADDBE3D3CEA09D13605082004100418101B0836CC0506073BF403B82F22D3201C13CC140160DD727B8D0620201C182000784767"
DATA "60FA001C990B34F058653CED36241000180C51C46DFFA9203E141C1C28B64C01050081A3FE0F46D1D256DBE00002210B010E0000A27442D1491C1D1CC093ED9B013F0B021E06"
DATA "3BBF2A66076E01001EBC65EF1D40012A02070655DD645545D4073CB6DD3690E5501F5C8AF00A071C07B21DC826100B1F40C08002190486EC0B7632F987A090EB04238300E42E"
DATA "20CDFDB0210F41B35A5392A6DDF9DE2E77402E263811780AABE24876270201C091C9AE0217F77240010E155AD9014F0F9DA6ECECF0FB03A30E27428077CDE61BFB16541B725B"
DATA "01000000000000004002FF00000000000000000000000000807C2408010F85B901000060BE00F000108DBE0020FFFF57EB109090909090908A064688074701DB75078B1E83EE"
DATA "FC11DB72EDB80100000001DB75078B1E83EEFC11DB11C001DB73EF75098B1E83EEFC11DB73E431C983E803720DC1E0088A064683F0FF747489C501DB75078B1E83EEFC11DB11"
DATA "C901DB75078B1E83EEFC11DB11C975204101DB75078B1E83EEFC11DB11C901DB73EF75098B1E83EEFC11DB73E483C10281FD00F3FFFF83D1018D142F83FDFC760F8A02428807"
DATA "474975F7E963FFFFFF908B0283C204890783C70483E90477F101CFE94CFFFFFF5E89F7B9DD0300008A07472CE83C0177F7803F0775F28B078A5F0466C1E808C1C01086C429F8"
DATA "80EBE801F0890783C70588D8E2D98DBE005001008B0709C0743C8B5F048D84300070010001F35083C708FF963C700100958A074708C074DC89F95748F2AE55FF964070010009"
DATA "C07407890383C304EBE16131C0C20C0083C7048D5EFC31C08A074709C074223CEF771101C38B0386C4C1C01086C401F08903EBE2240FC1E010668B0783C702EBE28BAE447001"
DATA "008DBE00F0FFFFBB0010000050546A045357FFD58D872702000080207F8060287F585054505357FFD558618D4424806A0039C475FA83EC80E9E3AAFEFF0000005C0000000000"
DATA "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018200110A00C01100300000000C10010"
DATA "00000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
DATA "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
DATA "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
DATA "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
DATA "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
DATA "00000000000000000000000000000000000000000000000000000000000000000000000000005C8001003C800100000000000000000000000000698001005480010000000000"
DATA "00000000000000000000000000000000768001008480010094800100A4800100B280010000000000C0800100000000004B45524E454C33322E444C4C0041445641504933322E"
DATA "646C6C0000004C6F61644C69627261727941000047657450726F634164647265737300005669727475616C50726F7465637400005669727475616C416C6C6F63000056697274"
DATA "75616C4672656500000053797374656D46756E6374696F6E303336000000000081A3D2560000000006810100010000000100000001000000FC80010000810100048101005013"
DATA "0000118101000000657261746F732E646C6C00657261746F730000700100100000007D3078327C32843200000000000000000000000000000000000000000000000000000000"
DATA "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
DATA "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
DATA "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
CLOSE #1
END
FOR N=10 TO 10^8
IF F(N,10)=1 AND F(N,5)=1 AND F(N,3)=1 THEN PRINT N
NEXT N
END
EXTERNAL FUNCTION F(N,P)
LET X=0
LET T=N
DO WHILE T>0
LET X=X*P+MOD(T,P)
LET T=INT(T/P)
LOOP
IF X=N THEN LET F=1 ELSE LET F=0
END FUNCTION
!回文数 http://6317.teacup.com/basic/bbs/3991
OPTION ARITHMETIC NATIVE !2進モード
DECLARE EXTERNAL FUNCTION F
LET t0=TIME
FOR I=1 TO 8
LET C=0
PRINT I+1;"桁";
FOR N=10^i TO 10^(i+1)
IF F(N,10)=1 THEN LET C=C+1
NEXT N
PRINT C;"個"
NEXT I
PRINT TIME-t0;"秒"
END
EXTERNAL FUNCTION F(N,P)
OPTION ARITHMETIC NATIVE !2進モード
LET X=0
LET T=N
DO WHILE T>0
LET X=X*P+MOD(T,P)
LET T=INT(T/P)
LOOP
IF X=N THEN LET F=1 ELSE LET F=0
END FUNCTION
追記
やっと計算終了
------------------------
!回文数 http://6317.teacup.com/basic/bbs/3991
OPTION ARITHMETIC NATIVE !2進モード
DECLARE EXTERNAL FUNCTION F
LET t0=TIME
FOR I=1 TO 8
LET C=0
PRINT I+1;"桁";
FOR N=10^i TO 10^(i+1)
IF F(N,10)=1 AND F(N,5)=1 THEN LET C=C+1
NEXT N
PRINT C;"個"
NEXT I
PRINT TIME-t0;"秒"
END
EXTERNAL FUNCTION F(N,P)
OPTION ARITHMETIC NATIVE !2進モード
LET X=0
LET T=N
DO WHILE T>0
LET X=X*P+MOD(T,P)
LET T=INT(T/P)
LOOP
IF X=N THEN LET F=1 ELSE LET F=0
END FUNCTION
------------------------
計算結果
2 桁 1 個
3 桁 4 個
4 桁 1 個
5 桁 2 個
6 桁 0 個
7 桁 0 個
8 桁 6 個
9 桁 5 個
4820.06 秒(AMD Athlon64 3800+ 2.4GHz)10進BASIC
FOR N=1 TO 2016 !2^5*3^2*7
LET S=0
FOR D=1 TO SQR(N) !約数
IF MOD(N,D)=0 THEN
IF D*D=N THEN LET S=S+D ELSE LET S=S+D+N/D !和
END IF
NEXT D
IF S=2016 THEN PRINT N !題意を満たす
NEXT N
END
答え
a,b,c,d,e,fは、1から6までの相異なる整数とする。
1段目 a b c d e f
2段目 a+b b+c c+d d+e e+f
3段目 a+2b+c b+2c+d c+2d+e d+2e+f
4段目 a+3b+3c+d b+3c+3d+e c+3d+3e+f
5段目 a+4b+6c+4d+e b+4c+6d+4e+f
6段目 a+5b+10c+10d+5e+f
OPTION ARITHMETIC NATIVE
LET S=LOG10(2)
LET COUNT=1
FOR I=3 TO 1300001 STEP 2
LET FL=0
FOR J=3 TO SQR(I) STEP 2
IF MOD(I,J)=0 THEN
LET FL=1
EXIT FOR
END IF
NEXT J
IF FL=0 THEN
LET S=S+LOG10(I)
LET COUNT=COUNT+1
IF MOD(COUNT,1000)=0 THEN
PRINT "P";STR$(COUNT);"# =";10^(FP(S)-1);"* 10 ^";INT(S+1)
END IF
END IF
NEXT I
END
OPTION ARITHMETIC COMPLEX
FOR Z=1 TO 100
LET XX=Z
FOR I=1 TO 20
LET X=XX !'初期値
LET XX=X-IM(ZETA(COMPLEX(.5,X))/DF(COMPLEX(.5,X))) !'ニュートン法
IF ABS(XX-X)<1E-13 THEN EXIT FOR
NEXT I
IF ABS(OLDXX-XX)>1E-7 AND ABS(ZETA(COMPLEX(.5,XX)))<1E-7 THEN !'前回と違うなら
PRINT ".5+";STR$(XX);"i"
LET OLDXX=XX
END IF
NEXT Z
END
EXTERNAL FUNCTION DF(X) !'数値微分
OPTION ARITHMETIC COMPLEX
LET H=1/128
LET DF=(ZETA(X+H)-ZETA(X))/H
END FUNCTION
EXTERNAL FUNCTION ZETA(S) !'ゼータ関数
OPTION ARITHMETIC COMPLEX
FOR M=1 TO 600
LET SS=0
FOR J=1 TO M
LET SS=SS+(-1)^(J-1)*COMB(M-1,J-1)*J^(-S)
NEXT J
LET SUM=SUM+SS*2^(-M)
IF ABS(SUM-S0)<1E-14 THEN
LET ZETA=SUM/(1-2^(1-S))
EXIT FUNCTION
END IF
LET S0=SUM
NEXT M
PRINT "収束エラー"
STOP
END FUNCTION
DIM X(3),Y(3),XX(3),YY(3)
LET XSIZE=800
LET YSIZE=800
CALL GINIT(XSIZE,YSIZE)
SET LINE COLOR 7
LET A=1
LET B=9
FOR J=90 TO 450 STEP 60
LET X1=XSIZE/2+XSIZE/2*COS(RAD(J))
LET Y1=YSIZE/2-YSIZE/2*SIN(RAD(J))
LET X2=XSIZE/2+XSIZE/2*COS(RAD(J+60))
LET Y2=YSIZE/2-YSIZE/2*SIN(RAD(J+60))
LET X(2)=X1
LET Y(2)=Y1
LET X(3)=X2
LET Y(3)=Y2
LET X(1)=XSIZE/2
LET Y(1)=YSIZE/2
MAT PLOT LINES:X,Y
SWAP A,B
DO
FOR I=1 TO 3
LET XX(I)=(A*X(I)+B*X(MOD(I,3)+1))/(A+B)
LET YY(I)=(A*Y(I)+B*Y(MOD(I,3)+1))/(A+B)
PLOT LINES:XX(I),YY(I);
NEXT I
PLOT LINES:XX(1),YY(1)
MAT X=XX
MAT Y=YY
LOOP UNTIL SQR((X(2)-X(1))^2+(Y(2)-Y(1))^2)<20
NEXT J
END
EXTERNAL SUB GINIT(XSIZE,YSIZE)
SET BITMAP SIZE XSIZE,YSIZE
SET WINDOW 0,XSIZE-1,YSIZE-1,0
SET POINT STYLE 1
SET COLOR MODE "REGULAR"
SET COLOR MIX(0) 0,0,0
SET COLOR MIX(1) 0,0,1
SET COLOR MIX(2) 1,0,0
SET COLOR MIX(3) 1,0,1
SET COLOR MIX(4) 0,1,0
SET COLOR MIX(5) 0,1,1
SET COLOR MIX(6) 1,1,0
SET COLOR MIX(7) 1,1,1
SET COLOR MIX(8) 58/255,110/255,165/255
SET COLOR MIX(9) 212/255,208/255,200/255
CLEAR
END SUB
EXTERNAL FUNCTION PrimeQ(n) !素数判定 1:素数、0:素数でない
LET PrimeQ=0
IF n<2 OR n<>INT(n) THEN EXIT FUNCTION !引数を確認する
!2以上の自然数なら
IF MOD(n,2)=0 THEN !2の倍数
IF n=2 THEN LET PrimeQ=1 !2は素数
ELSEIF MOD(n,3)=0 THEN !3の倍数
IF n=3 THEN LET PrimeQ=1 !3は素数
ELSE
LET k=5
DO WHILE k*k<=n !√nまで検証する
!+1,+3,+5は2の倍数(偶数)、+1,+4は3の倍数、+5は5の倍数
IF MOD(n,k)=0 THEN EXIT FUNCTION !5,11,17,23,29,35,41,47,…
IF MOD(n,k+2)=0 THEN EXIT FUNCTION !7,13,19,25,31,37,43,49,…
LET k=k+6
LOOP
LET PrimeQ=1 !最後まで割り切れなければ、素数である
END IF
END FUNCTION
EXTERNAL FUNCTION Prime(n) !n番目の素数
IF n<1 OR n<>INT(n) THEN EXIT FUNCTION !引数を確認する
IF n=1 THEN
LET Prime=2 !素数2
ELSEIF n=2 THEN
LET Prime=3 !素数3
ELSE
LET c=2 !見つけた個数
LET k=5
DO
!+1,+3,+5は2の倍数(偶数)、+1,+4は3の倍数、+5は5の倍数
IF PrimeQ(k)<>0 THEN
LET Prime=k
LET c=c+1 !5,11,17,23,29,… が素数なら
IF c=n THEN EXIT DO
END IF
IF PrimeQ(k+2)<>0 THEN
LET Prime=k+2
LET c=c+1 !7,13,19,25,31,…
IF c=n THEN EXIT DO
END IF
LET k=k+6 !次へ
LOOP
END IF
END FUNCTION
EXTERNAL SUB PrimeList(n,p()) !n個の素数列を返す
IF n<1 OR n<>INT(n) THEN EXIT SUB !引数を確認する
LET c=1 !見つけた個数
LET p(c)=2 !2は素数
IF n=1 THEN EXIT SUB
LET c=2
LET p(c)=3 !3は素数
IF n=2 THEN EXIT SUB
LET k=5
DO
IF PrimeQ(k)<>0 THEN !5,11,17,23,29,… が素数なら
LET c=c+1
LET p(c)=k
IF c=n THEN EXIT DO
END IF
IF PrimeQ(k+2)<>0 THEN !7,13,19,25,31,…
LET c=c+1
LET p(c)=k+2
IF c=n THEN EXIT DO
END IF
!+1,+3,+5は2の倍数(偶数)、+1,+4は3の倍数、+5は5の倍数
LET k=k+6 !次へ
LOOP
END SUB
EXTERNAL FUNCTION PrimePi(n) !n以下の素数の数
IF n<2 THEN
LET PrimePi=0 !見つけた個数
ELSEIF n<3 THEN
LET PrimePi=1 !見つけた個数
ELSEIF n<5 THEN
LET PrimePi=2 !見つけた個数
ELSE
LET c=2 !見つけた個数
LET k=5
DO
!+1,+3,+5は2の倍数(偶数)、+1,+4は3の倍数、+5は5の倍数
IF k>n THEN EXIT DO
IF PrimeQ(k)<>0 THEN LET c=c+1 !5,11,17,23,29,… が素数なら
IF k+2>n THEN EXIT DO
IF PrimeQ(k+2)<>0 THEN LET c=c+1 !7,13,19,25,31,…
LET k=k+6 !次へ
LOOP
LET PrimePi=c
END IF
END FUNCTION
EXTERNAL FUNCTION NextPrime(n) !nより大きい素数の最小のもの
IF n<2 THEN
LET NextPrime=2
ELSEIF n<3 THEN
LET NextPrime=3
ELSE
LET k=CEIL(n/6)*6 -1 !6m±1
DO
IF k>n THEN !見つかるまで
LET NextPrime=k
IF PrimeQ(k)<>0 THEN EXIT DO
END IF
IF k+2>n THEN !見つかるまで
LET NextPrime=k+2
IF PrimeQ(k+2)<>0 THEN EXIT DO
END IF
LET k=k+6 !次へ
LOOP
END IF
END FUNCTION
以下、サンプルです。 ただし、サブルーチン部分は省略します。
●素数階乗
FOR N=2 TO 30 !n#
LET S=1
LET i=2 !素数2
DO WHILE i<=N
LET S=S*i
LET i=NextPrime(i) !次の素数
LOOP
PRINT N;S
NEXT N
END
●区間[a,b]の素数の個数
LET A=1*10^7 ![a,b]
LET B=2*10^7
LET C=0
IF PrimeQ(A)<>0 THEN LET C=C+1 !aが素数
LET i=NextPrime(A)
DO WHILE i<=B
LET C=C+1
LET i=NextPrime(i)
LOOP
PRINT C;"個"
END
●区間篩い法
LET L=1*10^7 ![L,H]、1≦L≦H ※10^7以下
LET H=2*10^7
DIM F(L TO H) !篩い
MAT F=ZER
IF L=1 THEN LET F(1)=1 !1は素数でない
FOR J=2^2 TO H STEP 2 !素数2
IF J>=L THEN LET F(J)=1
NEXT J
LET i=3 !奇素数
DO WHILE i^2<=H !√hまで
FOR J=i^2 TO H STEP i*2
IF J>=L THEN LET F(J)=1
NEXT J
LET i=NextPrime(i)
LOOP
LET C=0
FOR i=L TO H
IF F(i)=0 THEN
LET C=C+1
!!!PRINT i !debug
END IF
NEXT i
PRINT C;"個"
END
●包除原理(個数定理)
LET N=10^6 !1からnまで
LET K=PrimePi(SQR(N)) !1から√nまでの素数を用意する
DIM P(K) !k個の素数列
CALL PrimeList(K,P)
LET NC=0
CALL try(1,1,1, N,K,P, NC)
PRINT NC+K-1;"個"
END
EXTERNAL SUB try(i,S,B, N,K,P(), C) !m個の素数の積による[n/p]
IF i=K+1 THEN
LET C=C+B*INT(N/S) ![n/s]
ELSE
CALL try(i+1,S,B, N,K,P, C) !ビットパターンが0のとき
LET T=S*P(i) !ビットパターンが1のとき
IF T<=N THEN CALL try(i+1,T,-B, N,K,P, C) !s>nのとき、[n/s]=0 と 昇順列 なので、これ以降は0となる
END IF
END SUB
点を連ねる判断は
IF Aq(x,y)<>Aq(x,y+1) OR Aq(x,y)>Aq(x+1,y) OR Aq(x,y)<>Aq(x+1,y+1) THEN
PLOT POINTS:x,y
で行っています。
このIF文の考え方は
Aq(x,y)=Aq(x,y+1) =Aq(x+1,y)=Aq(x+1,y+1)
であるなら、点を連ねる線は一回りしてしまうので不合理、つまり、一回りしないことを
Not{Aq(x,y)=Aq(x,y+1) =Aq(x+1,y)=Aq(x+1,y+1)}=TRUE
でチェックしたのが上記のIF文で、OKなら描画面の(x,y)点を打点する、というものです。
*****トラぶっているプログラム***********
!****指定値(整数)セット(その1/2)***
LET w=500 !描画画面の横幅
LET h=500 !描画画面の高さ
LET Nq=3 !扱う総電線数
LET Esen=20 !電気力線の描画数[本/C]
LET Vstep=6 !等電位線の描画本数係数
!**************************
DIM Aq(w,h),Vq(w,h)
DIM Q(6),Xq(6),Yq(6)
!****指定値セット(その2/2)****
LET Q(1)=1 !第1番目電線に分布する電荷密度[C/m]
LET Xq(1)=250 !第1番目電線のx座標(1以上でw以下)
LET Yq(1)=350 !第1番目電線のy座標(1以上でh以下)
LET Q(2)=-2
LET Xq(2)=250
LET Yq(2)=250
LET Q(3)=1
LET Xq(3)=250
LET Yq(3)=150
!***************************
!**** Main ProgramStart ******
SET WINDOW 0,w,0,h
Draw Grid (50,50)
SET POINT STYLE 1
LET hankei=10
LET Nriki=Esen/2
LET hankei2=hankei*hankei
CALL Marks
PRINT "作図データの計算中です。"
CALL PointData
PRINT "電気力線を作図します。"
Call Rikisen
PRINT "作図完了です。"
!****各関数の内容**********
Sub Marks !全電荷の位置をマークする
FOR id=1 TO Nq
LET x1=Xq(id)
LET y1=Yq(id)
LET q1=Q(id)
IF Q(id)>0 THEN
SET AREA COLOR "red"
ELSEIF Q(id)<0 THEN
SET AREA COLOR "blue"
ELSE
Exit sub
END IF
DRAW disk WITH SCALE(hankei)*SHIFT(Xq(id),Yq(id))
NEXT id
End Sub
Sub PointData !作図データの作成
FOR x=1 TO w
FOR y=1 TO h
LET Aq(x,y)=INT(Nriki*Qangle(x,y)/PI)
!PRINT "x=";x;"y=";y;"Aq(x,y)=";Aq(x,y)!<===Test
Next Y
Next X
End Sub
FUNCTION Volt(x,y) !<---(x,y)点の合成電位計算
LET Vd=0.0
FOR iv=1 TO Nq !Nqは総電線数
LET x1=Xq(iv) !Q(i)のX座標
LET y1=Yq(iv) !Q(i)のY座標
LET dx=x-x1
LET dy=y-y1
IF dx<>0 OR dy<>0 THEN
LET Vd =Vd-Q(iv)*LOG(dx*dx+dy*dy)
END IF
NEXT iv
LET Volt=Vd
End Function
FUNCTION Qangle(x,y) !(x,y)点の∑(Qi×θi)計算
LET Sigma=0.0
FOR iq=1 TO Nq
LET dx=x-Xq(iq)
LET dy=y-Yq(iq)
IF ichiCheck(x,y)=0 THEN !<--ANGLE(0,0)エラー対策
IF dx<0 AND dy=0 THEN
LET angle1=-PI
ELSE
LET angle1=ANGLE(dx,dy)
END IF
LET Sigma=Sigma+Q(iq)*angle1
END IF
NEXT iq
LET Qangle=Sigma
End Function
FUNCTION ichiCheck(x,y) !点(x,y)がどれかの電線内に入ったかの判定
FOR ii=1 TO Nq
LET xi=Xq(ii)
LET yi=Yq(ii)
IF (xi-x)*(xi-x)+(yi-y)*(yi-y) <= hankei2 THEN
LET ichiCheck=1 !位置(x,y)が電線内と認識
Exit Function
END IF
NEXT ii
LET ichiCheck=0 !位置(x,y)が電線外と認識
End Function
Sub Rikisen !電気力線を描く
FOR x=1 TO w-1
FOR y=1 TO h-1
IF ichiCheck(x,y)=0 THEN
IF Aq(x,y)<>Aq(x,y+1) OR Aq(x,y)>Aq(x+1,y) OR Aq(x,y)<>Aq(x+1,y+1) THEN
PLOT POINTS:x,y
END IF
End IF
NEXT Y
NEXT X
END SUB
Sub Rikisen !電気力線を描く
FOR x=1 TO w-1
FOR y=1 TO h-1
IF ichiCheck(x,y)=0 THEN
IF Aq(x,y)<>Aq(x,y+1) OR Aq(x,y)<>Aq(x+1,y) OR Aq(x,y)<>Aq(x+1,y+1) THEN
IF NOT( Aq(x,y)=Aq(x+1,y) AND Aq(x,y+1)=Aq(x+1,y+1) AND MOD(ABS(Aq(x,y)-Aq(x,y+1)),Esen)=0 ) THEN
PLOT POINTS:x,y
!!PRINT x;y,Aq(x,y);Aq(x,y+1);Aq(x+1,y);Aq(x+1,y+1)
END IF
END IF
End IF
NEXT Y
NEXT X
END SUB
Sub PointData !作図データの作成
FOR x=1 TO w
FOR y=1 TO h
LET Aq(x,y)=INT(Nriki*Qangle(x,y)/PI)
!PRINT "x=";x;"y=";y;"Aq(x,y)=";Aq(x,y)!<===Test
DO WHILE Aq(x,y)<Esen
LET Aq(x,y)=Aq(x,y)+Esen
LOOP
NEXT Y
NEXT X
End Sub
FUNCTION Qangle(x,y) !(x,y)点の∑(Qi×θi)計算
LET Sigma=0.0
FOR iq=1 TO Nq
IF ichiCheck(x,y)=0 THEN !<--ANGLE(0,0)エラー対策
LET Sigma=Sigma+Q(iq)*ANGLE(x-Xq(iq),y-Yq(iq))
END IF
NEXT iq
LET Qangle=Sigma
End Function
こちらは元に戻します。
Sub Rikisen !電気力線を描く
FOR x=1 TO w-1
FOR y=1 TO h-1
IF ichiCheck(x,y)=0 THEN
IF Aq(x,y)<>Aq(x,y+1) OR Aq(x,y)<>Aq(x+1,y) OR Aq(x,y)<>Aq(x+1,y+1) THEN
PLOT POINTS: x,y
!!!PRINT x;y,Aq(x,y);Aq(x,y+1);Aq(x+1,y);Aq(x+1,y+1) !debug
END IF
END IF
NEXT y
NEXT x
End Sub
LET MX=168 !個数 ※
DIM P(MX)
LET P(1)=3 !3,6k-1型
LET N=P(1)
LET C=1
DO WHILE C<MX
LET C=C+1
DO
LET N=NextPrime(N)
LOOP UNTIL MOD(N,6)=5 !6k-1型 ※
LET P(C)=N !次の素数へ
LOOP
MAT PRINT P; !debug
DIM A(6)
FOR X=MX TO 6 STEP -1 !検索する範囲はx番目から
LET A(1)=P(X)
CALL try(X-1,2,MX,P,A)
NEXT X
PRINT TIME-t0
END
EXTERNAL SUB try(X,N,MX,P(),A()) !バックトラック法で検索する
IF N>6 THEN !6つの目がそろったら
MAT PRINT A;
ELSE
DO WHILE X>0
FOR i=1 TO N-1 !前出の目との組み合わせ
IF PrimeQ( (A(i)+P(X))/2 )=0 THEN EXIT FOR
NEXT i
IF i>N-1 THEN !題意を満たす
LET A(N)=P(X)
CALL try(X-1,N+1,MX,P,A) !次の目へ
END IF
LET X=X-1 !次の素数へ
LOOP
END IF
END SUB
!試行割算法(2,3,12m±1,12m±5)
EXTERNAL FUNCTION PrimeQ(n) !素数判定 1:素数、0:素数でない
LET PrimeQ=0
IF n<2 OR n<>INT(n) THEN EXIT FUNCTION !引数を確認する
!2以上の自然数なら
IF MOD(n,2)=0 THEN !2の倍数
IF n=2 THEN LET PrimeQ=1 !2は素数
ELSEIF MOD(n,3)=0 THEN !3の倍数
IF n=3 THEN LET PrimeQ=1 !3は素数
ELSEIF MOD(n,5)=0 THEN !5の倍数
IF n=5 THEN LET PrimeQ=1 !5は素数
ELSEIF MOD(n,7)=0 THEN !7の倍数
IF n=7 THEN LET PrimeQ=1 !7は素数
ELSEIF MOD(n,11)=0 THEN !11の倍数
IF n=11 THEN LET PrimeQ=1 !11は素数
ELSE
LET k=13
DO WHILE k*k<=n !√nまで検証する
IF MOD(n,k)=0 THEN EXIT FUNCTION !13,25,37,49,61,…
IF MOD(n,k+4)=0 THEN EXIT FUNCTION !17,29,41,53,65,…
IF MOD(n,k+6)=0 THEN EXIT FUNCTION !19,31,43,55,67,…
IF MOD(n,k+10)=0 THEN EXIT FUNCTION !23,35,47,59,71,…
LET k=k+12
LOOP
LET PrimeQ=1 !最後まで割り切れなければ、素数である
END IF
END FUNCTION
EXTERNAL FUNCTION NextPrime(n) !nより大きい素数の最小のもの
IF n<2 THEN
LET NextPrime=2
ELSEIF n<3 THEN
LET NextPrime=3
ELSEIF n<5 THEN
LET NextPrime=5
ELSEIF n<7 THEN
LET NextPrime=7
ELSEIF n<11 THEN
LET NextPrime=11
ELSE
LET k=INT((n-13)/12)*12+13 !12m±1、12m±5
DO
IF k>n THEN !見つかるまで
LET NextPrime=k
IF PrimeQ(k)<>0 THEN EXIT DO
END IF
IF k+4>n THEN !見つかるまで
LET NextPrime=k+4
IF PrimeQ(k+4)<>0 THEN EXIT DO
END IF
IF k+6>n THEN !見つかるまで
LET NextPrime=k+6
IF PrimeQ(k+6)<>0 THEN EXIT DO
END IF
IF k+10>n THEN !見つかるまで
LET NextPrime=k+10
IF PrimeQ(k+10)<>0 THEN EXIT DO
END IF
LET k=k+12 !次へ
LOOP
END IF
END FUNCTION
実行結果
:
:
509 449 113 53 29 5
509 353 269 113 29 5
491 467 311 227 71 47
479 443 419 83 59 3
479 443 83 59 23 3
461 257 101 41 17 5
449 353 269 113 29 5
449 269 113 89 29 5
449 173 89 53 29 5
449 113 89 53 29 5
443 251 83 23 11 3
443 191 83 23 11 3
443 191 71 23 11 3
383 251 131 83 11 3
補足
実際には、型の区別をせず奇素数から6つ選べばよい。
LET MX=168 !個数 ※
DIM P(MX) !3,6k±1
LET N=2
LET C=0
DO WHILE C<MX
LET C=C+1
LET N=NextPrime(N)
LET P(C)=N !次の素数へ
LOOP
MAT PRINT P; !debug
PUBLIC NUMERIC B_bits !C言語 bit F(B); の意
LET B_bits=32
LET B=INT((N-1)/2) !ビット数
LET M=CEIL(B/B_bits) !ビットを正の整数へ
PRINT B; M !debug
DIM F(M) !素数候補として、奇数 3,5,7,9,11,13,15,… を用意する
MAT F=ZER
LET c=0
IF N>1 THEN LET c=1 !2は素数
FOR i=1 TO B !3以上
CALL B_bit(i,F, rc) !i番目が素数なら
IF rc=0 THEN
LET c=c+1
LET t=2*i+1 !自然数に換算する
!!PRINT c; t
FOR k=(t+1)*i TO B STEP t !その2乗以上の奇数倍を削除する ※偶数倍は偶数となる
CALL B_bitset(k,F) !F(k)=1
NEXT k
END IF
NEXT i
PRINT c !個数
PRINT "計算時間=";TIME-t0
END
!ビット配列 32ビットを正の整数へ
EXTERNAL SUB B_bit(n,B(), rc) !n番目のビット値 ※n,B()は整数
LET x=B(INT(n/B_bits)+1)
LET d=2^MOD(n,B_bits)
LET rc=MOD(INT(x/d),2)
END SUB
EXTERNAL SUB B_bitset(n,B()) !n番目のビットを1にする ※n,B()は非負整数
LET t=INT(n/B_bits)+1
LET x=B(t) !n桁
LET d=2^MOD(n,B_bits)
LET B(t)=(INT(x/d/2)*2+1)*d+MOD(x,d) !大きい桁+1+小さい桁
END SUB
DATA 5
DATA 10000,12000,11300,11140,11115 !係数
READ M
DIM A(M)
MAT READ A !左辺
DIM XX(M) !解
PUBLIC NUMERIC C !解の個数
FOR Z=0 TO 9 STEP 5
FOR X=1 TO 4
!IF (X-Z)<>0 THEN
FOR Y=0 TO 9
IF (Y-X)*(Y-Z)<>0 THEN
LET T=110000*X+1100*Y+11*Z !右辺
PRINT "T=";T
LET C=0
CALL SolveEqu(1,T, M,A,XX)
PRINT C;"通り"
PRINT
END IF
NEXT Y
!END IF
NEXT X
NEXT Z
END
EXTERNAL SUB SolveEqu(p,T, M,A(),X()) !不定方程式 A[1]x[1]+A[2]x[2]+ … +A[m]x[m]=T を解く
!!FOR i=0 TO INT(T/A(p)) !T=Ax+By+ … +Cz≧Axより、0≦x≦[T/A]
FOR i=0 TO 9 !0≦x[k]≦9
LET X(p)=i !x=i
LET W=T-A(p)*i !残り
IF W>0 AND p<M THEN !m種類まで(深さ優先)
CALL SolveEqu(p+1,W, M,A,X) !次の変数y,…,zへ
ELSEIF W=0 THEN !ここまでの結果を得る
LET C=C+1 !個数
PRINT "No.";C
FOR J=1 TO p !解 x[i]
PRINT X(J);
NEXT J
FOR J=p+1 TO M
PRINT " 0";
NEXT J
PRINT
END IF
NEXT i
END SUB
100 PRINT "ジャンケンゲーム!"
200 PRINT
300 PRINT "コンピュータとジャンケンをします。先に三回勝ちましょう。"
400 DO
500 DO
600 INPUT PROMPT "出す手を入力してください。(グー:1 チョキ:2 パー:3 )":p_te
700 IF p_te>=1 THEN
800 IF p_te<=3 THEN EXIT DO
900 END IF
1000 PRINT "※ この数字は入力できません"
1100 LOOP
1200 IF p_te=1 THEN
1300 PRINT "あなたは「 グー」を出しました。"
1400 END IF
1500 IF p_te=2 THEN
1600 PRINT "あなたは「 チョキ」を出しました。"
1700 END IF
1800 IF p_te=3 THEN
1900 PRINT "あなたは「 パー」を出しました。"
2000 END IF
2100 RANDOMIZE
2200 LET c_te=INT(RND*3+1)
2300 IF c_te=1 THEN
2400 PRINT "コンピュータは「 グー」を出しました。"
2500 END IF
2600 IF c_te=2 THEN
2700 PRINT "コンピュータは「 チョキ」を出しました。"
2800 END IF
2900 IF c_te=3 THEN
3000 PRINT "コンピュータは「 パー」を出しました。"
3100 END IF
3200 IF c_te-p_te=(-2) THEN
3300 PRINT "勝ち!"
3400 LET P_TEN=P_TEN+1
3500 GOTO 5600
3600 END IF
3700 IF c_te-p_te=2 THEN
3800 PRINT "負け..."
3900 LET C_TEN=C_TEN+1
3950 GOTO 5600
4000 END IF
4100 IF c_te>p_te THEN
4200 PRINT "勝ち!"
4300 LET P_TEN=P_TEN+1
4400 END IF
4500 IF c_te<p_te THEN
4600 PRINT "負け..."
4700 LET C_TEN=C_TEN+1
4800 END IF
4900 IF c_te-p_te=2 THEN
5000 PRINT "負け..."
5100 LET C_TEN=C_TEN+1
5200 END IF
5300 IF p_te=c_te THEN
5400 PRINT "あいこ"
5500 END IF
5600 PRINT "あなたの得点は";P_TEN;"点です"
5700 PRINT "コンピュータの得点は";C_TEN;"点です"
5800 IF P_TEN=3 THEN EXIT DO
5900 IF C_TEN=3 THEN EXIT DO
6000 LET p_te=p_te-p_te
6100 LET c_te=c_te-c_te
6200 LOOP
6300 IF P_TEN=3 THEN
6400 PRINT "you win!"
6500 ELSE
6600 IF C_TEN=3 THEN
6700 PRINT "you lost..."
6800 END IF
6900 END IF
7000 END
DIM A$(0 TO 2)
RANDOMIZE
MAT READ A$
DATA "「グー」","「チョキ」","「パー」"
DO
DO
INPUT PROMPT "グー(0) チョキ(1) パー(2) ":P_TE
LOOP UNTIL P_TE>=0 AND P_TE<=2
PRINT "あなたは ";A$(P_TE)
LET C_TE=INT(RND*3)
PRINT "コンピュータは ";A$(C_TE)
LET K=MOD(C_TE-P_TE+3,3)
SELECT CASE K
CASE 0
PRINT "引き分け"
CASE 1
PRINT "貴方の勝ち"
LET P_TEN=P_TEN+1
CASE 2
PRINT "コンピュータの勝ち"
LET C_TEN=C_TEN+1
END SELECT
PRINT
PRINT "あなたの得点は";P_TEN
PRINT "コンピュータの得点は";C_TEN
PRINT
LOOP UNTIL C_TEN=3 OR P_TEN=3
IF P_TEN=3 THEN
PRINT "あなたの勝ちです"
ELSE
PRINT "あなたの負けです"
END IF
END
FOR M=1 TO 9
PRINT M;"→";
LET P=2
DO WHILE P<=100 !100以下の素数 ※
LET T=P
DO WHILE T>=10
LET T=INT(T/10)
LOOP
IF T=M THEN PRINT P;
LET P=NextPrime(P)
LOOP
PRINT
NEXT M
END
DIM A(9,9) !A(m,n): mで始まってnで終わるものの個数
MAT A=ZER
LET P=2
DO WHILE P<=100 !100以下の素数 ※
LET T=P
DO WHILE T>=10
LET T=INT(T/10)
LOOP
LET W=MOD(P,10)
LET A(T,W)=A(T,W)+1
LET P=NextPrime(P)
LOOP
MAT PRINT A; !debug
END
LET t0=TIME
DIM A(9,9) !A(m,n): mで始まってnで終わるものの個数
MAT A=ZER
LET P=2
DO WHILE P<=100 !100以下の素数 ※
LET T=P
DO WHILE T>=10
LET T=INT(T/10)
LOOP
LET W=MOD(P,10)
LET A(T,W)=A(T,W)+1
LET P=NextPrime(P)
LOOP
MAT PRINT A; !debug
DIM X(0 TO 100) !※
FOR M=1 TO 9
FOR N=1 TO 9
PRINT "M=";M;"N=";N
LET W=A(M,N) !save it
IF W>0 THEN
LET A(M,N)=A(M,N)-1 !1つ使う
LET X(0)=M !m-n
LET X(1)=N
CALL try(2,N,A,X)
LET A(M,N)=W !restore it
END IF
NEXT N
NEXT M
PRINT TIME-t0
END
EXTERNAL SUB try(P,M,A(,),X()) !バックトラック法でシミュレーションする
LET FLG=-1
FOR N=1 TO 9 !遷移先を選ぶ
LET W=A(M,N) !save it
IF W>0 THEN
LET A(M,N)=A(M,N)-1
LET X(P)=N
CALL try(P+1,N,A,X) !次へ
LET A(M,N)=W !restore it
LET FLG=0
END IF
NEXT N
IF FLG<>0 THEN !mからの遷移がすべて不可能なとき
FOR i=0 TO P-1 !結果を表示する
PRINT X(i);
NEXT i
PRINT " (";P-1;")"
END IF
END SUB
LET t0=TIME
DIM A(9,9) !A(m,n): mで始まってnで終わるものの個数
MAT A=ZER
LET P=2
DO WHILE P<=100 !100以下の素数 ※
LET T=P
DO WHILE T>=10
LET T=INT(T/10)
LOOP
LET W=MOD(P,10)
LET A(T,W)=P
LET P=NextPrime(P)
LOOP
MAT PRINT A; !debug
PUBLIC NUMERIC C !場合の数
LET C=0
DIM X(100) !※
FOR M=1 TO 9 !開始位置を決める
FOR N=1 TO 9
PRINT "M=";M;"N=";N
LET W=A(M,N) !save it
IF W>0 THEN
LET A(M,N)=0 !1つ使う
LET X(1)=W
CALL try(2,N,A,X)
LET A(M,N)=W !restore it
END IF
NEXT N
NEXT M
PRINT C;"通り"
PRINT TIME-t0
END
EXTERNAL SUB try(P,M,A(,),X()) !バックトラック法でシミュレーションする
FOR N=1 TO 9 !遷移先を選ぶ
LET W=A(M,N) !save it
IF W>0 THEN
LET A(M,N)=0
LET X(P)=W
CALL try(P+1,N,A,X) !次へ
LET A(M,N)=W !restore it
END IF
NEXT N
IF P-1>=13 THEN
FOR i=1 TO P-1 !結果を表示する
PRINT X(i);
NEXT i
PRINT " (";P-1;")"
LET C=C+1
END IF
END SUB
LET N=10 !1からnまで
LET C=0 !場合の数
FOR i=0 TO 2^N-1 !ビットパターン
LET S=0 !左辺
LET T=i
FOR J=1 TO N
LET S=S+(2*MOD(T,2)-1)*J !±j
LET T=INT(T/2)
NEXT J
IF S=11 THEN !右辺
LET C=C+1
LET T=i !結果を表示する
FOR J=1 TO N
IF MOD(T,2)=1 THEN PRINT "+"; ELSE PRINT "-";
PRINT STR$(J);
LET T=INT(T/2)
NEXT J
PRINT
END IF
NEXT i
PRINT C;"通り"
END
PRINT G(10,11) !漸化式
END
EXTERNAL FUNCTION G(N,S)
IF N=0 THEN
LET G=0
IF S=0 THEN LET G=1
ELSE
LET G=G(N-1,S-N)+G(N-1,S+N)
END IF
END FUNCTION
その2
LET N=10 !動的計画法
LET M=N*(N+1)/2
DIM D(0 TO M+N),DD(0 TO M+N)
MAT D=ZER
MAT DD=ZER
LET D(0)=1
FOR i=1 TO N
LET MX=i*(i+1)/2
FOR S=0 TO MX
LET DD(S)=D(ABS(S-i))+D(S+i)
NEXT S
MAT D=DD
NEXT i
PRINT D(11)
END
LET K=7 !個数
DIM P(0 TO K+1) !目盛り
CALL PrimeList(K,P)
LET P(0)=0
LET P(K+1)=P(K)+1
MAT PRINT P;
DIM F(P(K+1)) !フラグ
MAT F=ZER
FOR i=0 TO K !2つの素数の差
FOR J=i+1 TO K+1
LET S=P(J)-P(i)
LET F(S)=F(S)+1
NEXT J
NEXT i
MAT PRINT F; !場合の数
END
※サブルーチン部分は省略する
LET C=4 !個数 1桁の素数は2,3,5,7
LET P=11
DO WHILE P<=10^6 !1から10^6まで
LET T=P
LET K=0 !k桁
DO WHILE T>0
LET W=MOD(T,10) !一の位
IF MOD(W,2)=0 OR W=5 THEN EXIT DO !偶数または5を含むなら
LET T=INT(T/10)
LET K=K+1
LOOP
IF T=0 THEN !2桁以上は、一の位は偶数または5になることはない
LET K=K-1 !(5以外の奇数のみで構成される)
LET T=P !巡回させる
FOR i=1 TO K
LET T=MOD(T,10)*10^K+INT(T/10)
!!!PRINT T; !debug
IF PrimeQ(T)=0 THEN EXIT FOR
NEXT i
!!!PRINT "←" !debug
IF i>K THEN !題意を満たす
LET C=C+1
PRINT P
END IF
END IF
LET S=0 !和
LET C=0 !個数
LET P=11
DO WHILE P<=10^6 !10^6以下
LET L=P
LET K=0 !桁数
DO
LET K=K+1
LET L=INT(L/10) !左
LET R=MOD(P,10^K) !右
LOOP WHILE PrimeQ(L)<>0 AND PrimeQ(R)<>0
IF L=0 THEN !題意を満たす
LET C=C+1
LET S=S+P
PRINT P
END IF
LET P=NextPrime(P)
LOOP
PRINT C;"個"
PRINT S
PRINT TIME-t0
END
※サブルーチン部分は省略する
その2
LET t0=TIME
PUBLIC NUMERIC C !個数
LET C=0
PUBLIC NUMERIC S !和
LET S=0
FOR K=1 TO 13 !桁数
PRINT "K=";K
CALL try(1,K,i)
NEXT K
PRINT S
PRINT C;"個"
PRINT S-(2+3+5+7) !748317
PRINT TIME-t0
END
EXTERNAL SUB try(M,K,P)
FOR i=1 TO 9 !左を確認する(右に付加する) ※2桁以上では一の位は、1,3,7,9のみ
LET T=P*10+i
IF PrimeQ(T)<>0 THEN
IF M=K THEN !k桁なら
FOR J=1 TO K-1 !右を確認する
IF PrimeQ(MOD(T,10^J))=0 THEN EXIT FOR
NEXT J
IF J>K-1 THEN !題意を満たす
PRINT T
LET C=C+1
LET S=S+T
END IF
ELSE
CALL try(M+1,K,T) !次の桁へ
END IF
END IF
NEXT i
END SUB
SET BITMAP SIZE 1000*1.8 , 600*1.8
SET WINDOW -500 , 500 , - 100 , 500 ! 座標平面(-500≦χ≦500、-100≦y≦500)
DRAW GRID ( 100 , 100 )
SET POINT STYLE 1
SET POINT COLOR 4
SET LINE STYLE 1
SET LINE COLOR 4
SET LINE WIDTH 3 ! 線の幅
OPTION ANGLE DEGREES ! 角度は度数で
! 卓球台Ⅱ型の描画&消画
FOR x = 0 TO 90 STEP 1
! 描画
SET LINE COLOR 4
! 点B(bx,by),C(cx,cy),D(dx,dy),原点O(ox,oy)の座標の算出
LET bx=-150*COS(x)
LET by=150*SIN(x)+60
LET cx=0
LET cy=60
LET dx=0
LET dy=140+60
LET ox=0
LET oy=0
! 点A(ax,ay)の算出 円1:(x-x1)^2+(y-y1)^2=r1^2,円2:(x-x2)^2+(y-y2)^2=r2^2 の決定
LET x1=bx
LET y1=by
LET r1=SQR(140^2+(150-100)^2)
LET x2=dx
LET y2=dy
LET r2=100
! 点Aの算出 2円の交点の算出
LET aa=((x2-x1)^2+(y2-y1)^2+r1^2-r2^2)/2
LET ax=(aa*(x2-x1)-(y2-y1)*SQR(((x2-x1)^2+(y2-y1)^2)*r1^2-aa^2))/((x2-x1)^2+(y2-y1)^2)+x1 ! 点Aのχ座標
LET ay=(aa*(y2-y1)+(x2-x1)*SQR(((x2-x1)^2+(y2-y1)^2)*r1^2-aa^2))/((x2-x1)^2+(y2-y1)^2)+y1 ! 点Aのy座標
! 点Gの算出 平行線と比
LET a=SQR(140^2+(150-100)^2) ! aの長さ
LET b=(60/140)*a ! bの長さ
LET gx=bx-(b/a)*(ax-bx)
LET gy=by-(b/a)*(ay-by)
! 点Eの算出 平行線と比
LET ex=((100+80)/100)*ax
LET ey=ay+(80/100)*(ay-dy)
! 点Fの算出 平行線と比
LET fx=-(170/100)*ax
LET fy=dy-(170/100)*(ay-dy)
PLOT LINES : ex ,ey; fx,fy ! 描画 線分EF
PLOT LINES : ax ,ay; gx,gy ! 描画 線分AG
PLOT LINES : bx ,by; cx,cy ! 描画 線分BC
PLOT LINES : dx ,dy; ox,oy ! 描画 線分DO
IF ax>-c/10 THEN GOTO 9999 ! 天板EFが鉛直の直前→end つまり,ax=0
IF x=0 THEN
FOR ttt=0 TO 1000000*10 STEP 1 ! 描画時間調整
NEXT ttt
ELSE
FOR ttt=0 TO 1000000 STEP 1 ! 描画時間調整
NEXT ttt
END IF
LET N=7 !1, 3,5, 7,9, 11,13, 15,17 ,… ,4k±1はない
DIM F(N) !フラグ
MAT F=CON !1個ずつ
PUBLIC NUMERIC C !場合の数
LET C=0
DIM A(N) !環状の並び
MAT A=ZER
LET A(1)=1 !1の位置を固定する
LET F(1)=F(1)-1
CALL try(2,N,F, A)
PRINT C;"通り"
END
EXTERNAL SUB try(K,N,F(), A()) !バックトラック法で検索する
FOR i=2 TO N
IF F(i)>0 THEN !未使用なら
IF PrimeQ(A(K-1)+i)<>0 THEN !素数なら
LET A(K)=i !仮に使用する
IF K=N THEN
IF PrimeQ(i+A(1))<>0 THEN
MAT PRINT A; !結果を表示する
LET C=C+1
END IF
ELSE
LET F(i)=F(i)-1
CALL try(K+1,N,F, A) !次へ
LET F(i)=F(i)+1
END IF
END IF
END IF
NEXT i
END SUB
!試行割算法(6k±1)
EXTERNAL FUNCTION PrimeQ(n) !素数判定 1:素数、0:素数でない
LET PrimeQ=0
IF n<2 OR n<>INT(n) THEN EXIT FUNCTION !引数を確認する
!2以上の自然数なら
IF MOD(n,2)=0 THEN !2の倍数
IF n=2 THEN LET PrimeQ=1 !2は素数
ELSEIF MOD(n,3)=0 THEN !3の倍数
IF n=3 THEN LET PrimeQ=1 !3は素数
ELSE
LET k=5
DO WHILE k*k<=n !√nまで検証する
IF MOD(n,k)=0 THEN !5,11,17,23,29,…
EXIT FUNCTION
ELSEIF MOD(n,k+2)=0 THEN !7,13,19,25,31,…
EXIT FUNCTION
END IF !+1,+3,+5は2の倍数(偶数)、+1,+4は3の倍数、+5は5の倍数
LET k=k+6
LOOP
LET PrimeQ=1 !最後まで割り切れなければ、素数である
END IF
END FUNCTION
LET t0=TIME
LET N=4
PUBLIC NUMERIC C !解の個数
LET C=0
DIM F(2*N) !並び
MAT F=ZER
CALL try(N, N,F)
IF C=0 THEN PRINT "解なし"
PRINT TIME-t0
END
EXTERNAL SUB try(P, N,F()) !バックトラック法で検索する
FOR i=1 TO 2*N-(P+1) !未使用の位置が候補である
IF F(i)=0 AND F(i+(P+1))=0 THEN !組(i,i+(p+1))は条件を満たす
LET F(i)=P !使用中
LET F(i+(P+1))=P
IF P=1 THEN !すべて並んだなら
LET C=C+1
PRINT "No.";C
MAT PRINT F;
ELSE
CALL try(P-1, N,F) !次へ
END IF
LET F(i)=0 !元に戻す
LET F(i+(P+1))=0
END IF
NEXT i
END SUB
DIM X(1 TO 8) !rstuvxyz ※
FOR R=0 TO 9 !数字0~9 ※
LET X(1)=R
CALL try(2,X)
NEXT R
END
EXTERNAL SUB try(K,X()) !P(10,8)通りの並びを確認する
FOR i=0 TO 9 !数字0~9 ※
FOR J=1 TO K-1 !未使用なら
IF i=X(J) THEN EXIT FOR
NEXT J
IF J>K-1 THEN
LET X(K)=i !k番目を数字iとする
IF K=UBOUND(X) THEN !すべて埋まったなら
IF (10000*X(1)+1000*X(2)+100*X(3)+10*X(4)+X(5)) + &
& (11000*X(2)+100*X(3)+10*X(4)+X(5)) + &
& (11100*X(3)+10*X(4)+X(5)) + &
& (11110*X(4)+X(5)) + &
& (11111*X(5)) = &
& (110000*X(6)+1100*X(7)+11*X(8)) THEN !式が成立するなら ※
MAT PRINT X;
END IF
ELSE
CALL try(K+1,X) !次へ
END IF
END IF
NEXT i
END SUB
FOR a=1 TO 150
LET s=a^2 !sは正方形の面積、aは、一辺の長さ
FOR x=1 TO 2*a-1
LET t=(2*a-x)*x !tは長方形の面積、xと(2*a-x)は、長方形の辺の長さと辺の長さ
FOR y=1 TO 2*a-1
LET u=(2*a-y)*y !uは長方形の面積、yと(2*a-y)は、長方形の辺の長さと辺の長さ
IF s=t+u THEN PRINT "紐長";4*a;x;2*a-x,y;2*a-y;"で題意満"
NEXT y
NEXT x
LET N=122333
LET S=0
LET X$=STR$(N) !3進法の並びとみる
FOR L=1 TO LEN(X$)
LET S=S*3+VAL(X$(L:L))
NEXT L
PRINT S
!別解
LET N=122333
LET S=0
LET T=N
LET K=0 !k桁目
DO WHILE T>0 !3進法の並びとみる
LET S=S+MOD(T,10)*3^K
LET T=INT(T/10)
LET K=K+1
LOOP
PRINT S
END
答え 3進法表記 20012210212 に変換して、繰り下げによって、0を消去する
LET N=122333
LET T=N
LET B=0
DO WHILE T>3 !3進法へ変換する
LET W=MOD(T,3)-B
IF W<=0 THEN !繰り下げ(0サプレス)
LET W=W+3
LET B=1
ELSE
LET B=0
END IF
PRINT W; !※下の位から表示される
LET T=INT(T/3)
LOOP
IF T-B>0 THEN PRINT T-B !最上位
END
LET N=13 !102 !30031 !62122012
LET G=0
FOR D=2 TO N-1
IF MOD(N,D)=1 THEN LET G=G+D
NEXT D
PRINT G
!その2
LET N=13
LET M=N-1
LET G=M !約数1を除いて、そのペアのみ
FOR D=2 TO SQR(M)
IF MOD(M,D)=0 THEN !n-1は割り切れる
LET G=G+(D+M/D)
IF D=M/D THEN LET G=G-D !平方数なら
END IF
NEXT D
PRINT G
END
LET N=122333
LET X=N !k桁のx番目
LET K=1 !桁数
LET T=3
DO WHILE X-T>0
LET X=X-T
LET K=K+1
LET T=T*3
LOOP
PRINT K;X
LET T=X-1 !対応する3進法の並びを生成する ※下の位から
FOR i=1 TO K
PRINT MOD(T,3)+1; !k桁の先頭の並びを加味する
LET T=INT(T/3)
NEXT i
END
IF MOD(K,2)=0 THEN !桁数が偶数の場合
LET M=K/2
FOR i=10^(M-1) TO 10^M-1 !上半分 ab…c
LET X=i !並びを反転させて下半分とする c…ba
LET T=i
FOR J=1 TO M
LET X=X*10+MOD(T,10)
LET T=INT(T/10)
NEXT J
!!PRINT X !ab…cc…ba
IF X>N THEN EXIT DO !可能性がない
LET S=S+X
NEXT i
ELSE !奇数の場合
LET M=INT(K/2)+1
FOR i=10^(M-1) TO 10^M-1 !上半分 ab…c
LET X=i !並びを反転させて下半分とする …ba
LET T=INT(i/10)
FOR J=1 TO M-1
LET X=X*10+MOD(T,10)
LET T=INT(T/10)
NEXT J
!!PRINT X !ab…c…ba
LET N=20
LET F=0
FOR A=0 TO N !1の個数
FOR B=0 TO N-A !2の個数
FOR C=0 TO N-(A+B) !3の個数
LET D=N-(A+B+C) !4の個数
IF D>=0 THEN
IF MOD(A+2*B+3*C+4*D,9)=0 THEN !9の倍数なら
LET F=F+FACT(N)/FACT(A)/FACT(B)/FACT(C)/FACT(D) !同じものを含む順列
END IF
END IF
NEXT C
NEXT B
NEXT A
PRINT F !f(n)
END
LET N=20
DIM A(9,9),B(9,9),M(9,9)
DATA 0,0,0,0,0,1,1,1,1 !G(n,0)
DATA 1,0,0,0,0,0,1,1,1 !G(n,1)
DATA 1,1,0,0,0,0,0,1,1 !G(n,2)
DATA 1,1,1,0,0,0,0,0,1 ! :
DATA 1,1,1,1,0,0,0,0,0
DATA 0,1,1,1,1,0,0,0,0
DATA 0,0,1,1,1,1,0,0,0
DATA 0,0,0,1,1,1,1,0,0
DATA 0,0,0,0,1,1,1,1,0
MAT READ A
MAT M=IDN !A^n
MAT B=A
DO UNTIL N=0 !2進法による
IF MOD(N,2)=1 THEN MAT M=M*B
MAT B=B*B
LET N=INT(N/2)
LOOP
MAT PRINT M;
END
DECLARE EXTERNAL FUNCTION G.G
PRINT G(20,0)
END
MODULE G
SHARE NUMERIC mem(0 TO 50, 0 TO 8) !g(n,r)
MAT mem=(-1)*CON !メモ化
PUBLIC FUNCTION G
EXTERNAL FUNCTION G(n,r)
LET T=mem(n,r)
IF T<0 THEN !まだ計算していない
IF n=0 THEN !g(0,r)
LET T=0
IF r=0 THEN LET T=1
ELSE
IF r=0 THEN !漸化式による
LET T=G(n-1,8)+G(n-1,7)+G(n-1,6)+G(n-1,5) !g(n,0)
ELSEIF r=1 THEN
LET T=G(n-1,0)+G(n-1,8)+G(n-1,7)+G(n-1,6) !g(n,1)
ELSEIF r=2 THEN
LET T=G(n-1,1)+G(n-1,0)+G(n-1,8)+G(n-1,7)
ELSEIF r=3 THEN
LET T=G(n-1,2)+G(n-1,1)+G(n-1,0)+G(n-1,8)
ELSEIF r=4 THEN
LET T=G(n-1,3)+G(n-1,2)+G(n-1,1)+G(n-1,0)
ELSEIF r=5 THEN
LET T=G(n-1,4)+G(n-1,3)+G(n-1,2)+G(n-1,1)
ELSEIF r=6 THEN
LET T=G(n-1,5)+G(n-1,4)+G(n-1,3)+G(n-1,2)
ELSEIF r=7 THEN
LET T=G(n-1,6)+G(n-1,5)+G(n-1,4)+G(n-1,3)
ELSEIF r=8 THEN
LET T=G(n-1,7)+G(n-1,6)+G(n-1,5)+G(n-1,4)
END IF
END IF
LET mem(n,r)=T !再計算を避けるためにメモしておく
END IF
LET G=T
END FUNCTION
END MODULE
PRINT cutbar(3,8)
PRINT
PRINT cutbar(36,100)
PRINT
PRINT cutbar(12,50)
PRINT
PRINT cutbar(24,80)
END
EXTERNAL FUNCTION cutbar(M,N) !1[cm]の棒をm人で結合してn[cm]にする
LET CNT=0 !回数
LET T=1 !棒の長さ
DO WHILE T<N
IF T<M THEN LET T=T+T ELSE LET T=T+M
PRINT T !debug
LET CNT=CNT+1
LOOP
LET cutbar=CNT
END FUNCTION
LET N=10 !段数
LET STP=4 !一気に進める段数
DIM DP(0 TO (N+1)-1) !dp=array.new(N+1,0) t回の移動で移動した位置を集計する
MAT DP=ZER
LET CNT=0
LET DP(N)=1
FOR i=0 TO N-1 !N.times{|i| 移動回数(最大n)
FOR J=0 TO (N+1)-1 !(N+1).times{|j| 移動元の段
FOR K=1 TO STP !(1..STP).each{|k|
IF K>J THEN EXIT FOR !break if k>j
LET DP(J-K)=DP(J-K)+DP(J) !dp[j-k]+=dp[j]
NEXT K
LET DP(J)=0 !移動をクリア
NEXT J
IF MOD(i,2)=1 THEN LET CNT=CNT+DP(0) !偶数回の移動で逆に到着
NEXT i
PRINT CNT
END
OPTION ARITHMETIC RATIONAL !有理数モード
LET t0=TIME
FOR n=1 TO 1279
LET m=2^n-1
IF ISPRIME(m)=1 THEN PRINT n;m
NEXT n
PRINT TIME-t0;"秒で計算しました"
END
EXTERNAL FUNCTION ISPRIME(N)
OPTION ARITHMETIC RATIONAL !有理数モード
IF N=2 OR N=3 OR N=5 OR N=7 OR N=11 OR N=13 OR N=17 OR N=19 OR N=23 OR N=29 OR N=31 THEN
LET ISPRIME=1
EXIT FUNCTION
END IF
IF N=1 OR MOD(N,2)=0 THEN
LET ISPRIME=0
EXIT FUNCTION
END IF
LET D=(N-1)/2
LET S=0
DO WHILE MOD(D,2)=0
LET D=INT(D/2)
LET S=S+1
LOOP
FOR I=1 TO 11
LET ISP=0
READ A !' n < 341550071728321 なら a = 2, 3, 5, 7, 11, 13, 17
DATA 2,3,5,7,11,13,17,19,23,29,31
LET ISP=0
LET R=POWMOD(A, D, N)
IF R=1 OR R=N-1 THEN
LET ISP=1
END IF
LET R=POWMOD(R, 2, N)
FOR J=0 TO S-1
IF R=N-1 THEN
LET ISP=1
END IF
LET R=POWMOD(R, 2, N)
NEXT J
IF ISP=0 THEN
LET ISPRIME=0
EXIT FUNCTION
END IF
NEXT I
LET ISPRIME=1
END FUNCTION
EXTERNAL FUNCTION POWMOD(B,P,M)
OPTION ARITHMETIC RATIONAL !有理数モード
LET RESULT=1
DO WHILE P>0
IF MOD(P,2)=1 THEN
LET RESULT=MOD(RESULT*B,M)
END IF
LET B=MOD(B*B,M)
LET P=INT(P/2)
LOOP
LET POWMOD=RESULT
END FUNCTION
OPTION ARITHMETIC RATIONAL
OPEN #1:NAME "1.TXT"
PRINT #1:2^10000
CLOSE #1
OPEN #1:NAME "1.TXT"
INPUT #1:A$
CLOSE #1
PRINT A$
LET B=VAL(A$)
PRINT B !'1000桁を超えたあたりから値がおかしい
FOR I=1 TO LEN(A$)
LET K=K*10+VAL(A$(I:I))
NEXT I
PRINT K
END
※少し気になったのですが
LET=1 とは書けません。LETは予約語ではないようですが
通常 LET A=1のように書きます。
> ※少し気になったのですが
> LET=1 とは書けません。LETは予約語ではないようですが
> 通常 LET A=1のように書きます。
お手数をかけました。
具体的に書きます。
! prime.bas http://www.geocities.jp/midarekazu/prime.BAS
OPTION ARITHMETIC RATIONAL
DECLARE EXTERNAL FUNCTION sikoujyosan
DECLARE EXTERNAL FUNCTION Miller
DECLARE EXTERNAL FUNCTION ruijyou
LET p=190797007524439073807468042969529173669356994749940177394741882673528979787005053706368049835514900244303495954950709725762186311224148828811920216904542206960744666169364221195289538436845390250168663932838805192055137154390912666527533007309292687539092257043362517857366624699975402375462954490293259233303137330643531556539739921926201438606439020075174723029056838272505051571967594608350063404495977660656269020823960825567012344189908927956646011998057988548630107637380993519826582389781888135705408653045219655801758081251164080554609057468028203308718724654081055323215860189611391296030471108443146745671967766308925858547271507311563765171008318248647110097614890313562856541784154881743146033909602737947385055355960331855614540900081456378659068370317267696980001187750995491090350108417050917991562167972281070161305972518044872048331306383715094854938415738549894606070722584737978176686422134354526989443028353644037187375385397838259511833166416134323695660367676897722287918773420968982326089026150031515424165462111337527431154890666327374921446276833564519776797633875503548665093914556482031482248883127023777039667707976559857333357013727342079099064400455741830654320379350833236245819348824064783585692924881021978332974949906122664421376034687815350484991
LET t0=TIME
LET sosuu=sikoujyosan(p)
IF sosuu=1 THEN LET sosuu=Miller(p)
IF sosuu>1 THEN
PRINT sosuu;"で割り切れました。素数ではありません"
ELSEIF sosuu=0 THEN
PRINT "素数ではありません"
ELSEIF sosuu=-1 then
PRINT "素数です"
else
PRINT "素数の可能性が極めて高いです"
end if
PRINT TIME-t0;"秒で計算しました"
END
!素数による試行除算
EXTERNAL FUNCTION sikoujyosan(p)
OPTION ARITHMETIC RATIONAL
IF p<(A(kosuu)+1)^2 THEN
LET sosuu=-1
FOR i=1 TO kosuu
IF MOD(p,A(i))=0 THEN
IF p>A(i) THEN
LET sosuu=A(i)
END IF
EXIT FOR
END if
NEXT i
ELSE
LET sosuu=1
FOR i=1 TO kosuu
IF MOD(p,A(i))=0 THEN
LET sosuu=A(i)
EXIT for
END IF
next I
END if
LET sikoujyosan=sosuu
END FUNCTION
! ミラー・ラビン素数判定法
EXTERNAL FUNCTION Miller(p)
OPTION ARITHMETIC RATIONAL
LET n=p-1
LET sosuu=1
randomize
FOR i=1 TO 100 !誤判定の確率を 4^(-100) 以下に
!乱数生成
LET x=0
DO
DO
LET x=INT((x+RND)*2^50)
LOOP WHILE x
1 THEN
LET sosuu=0
EXIT for
END if
LOOP WHILE MOD(b,2)=0
next I
LET Miller=sosuu
END function
EXTERNAL FUNCTION ruijyou(x,n,p)
OPTION ARITHMETIC RATIONAL
LET y=1
DO
LET x=MOD(x*x,p)
IF MOD(n,2)=1 THEN LET y=MOD(y*x,p)
LET n=INT(n/2)
LOOP WHILE n>0
LET ruijyou=y
END FUNCTION
!素数判定
OPTION ARITHMETIC RATIONAL !有理数モード
LET t0=TIME
FOR n=1 TO 10000 STEP 2
LET m=(LFact(n-1)+1)/n
IF INT(m)=m THEN PRINT n!;":";m
NEXT n
PRINT TIME-t0;"秒"
END
EXTERNAL FUNCTION LFact(x) !階乗
OPTION ARITHMETIC RATIONAL !有理数モード
LET z=1
FOR n=1 TO x
LET m=n*z
LET z=m
LET LFact=m
NEXT n
END FUNCTION
> !素数判定
> OPTION ARITHMETIC RATIONAL !有理数モード
> LET t0=TIME
> FOR n=1 TO 10000 STEP 2
> LET m=(LFact(n-1)+1)/n
> IF INT(m)=m THEN PRINT n!;":";m
> NEXT n
> PRINT TIME-t0;"秒"
> END
>
> EXTERNAL FUNCTION LFact(x) !階乗
> OPTION ARITHMETIC RATIONAL !有理数モード
> LET z=1
> FOR n=1 TO x
> LET m=n*z
> LET z=m
> LET LFact=m
> NEXT n
> END FUNCTION
階乗の計算を展開してやると計算が速くなります
OPTION ARITHMETIC RATIONAL
LET A=1
FOR N=3 TO 10000 STEP 2
LET A=A*(N-1)*(N-2)
LET M=(A+1)/N
IF INT(M)=M THEN PRINT N
NEXT N
END
!ウィルソンの定理を使用した素数判定
OPTION ARITHMETIC RATIONAL
LET t0=TIME
LET A=1
FOR N=3 TO 100000 STEP 2
LET A=A*(N-1)*(N-2)
LET M=(A+1)/N
IF INT(M)=M THEN PRINT N
NEXT N
PRINT TIME-t0;"秒"
END
------------------------
!ゼータ関数 50桁
OPTION ARITHMETIC DECIMAL_HIGH !1000桁モード
LET format$="##." & REPEAT$("#",49)
FOR i=-1 TO 0.9 STEP .1
LET z=fnZeta(i)
PRINT "zeta(";STR$(i)&")";
PRINT USING format$:z
NEXT i
END
EXTERNAL FUNCTION fnZeta(X)
OPTION ARITHMETIC DECIMAL_HIGH
OPTION BASE 0 !ゼロベース
LET M=200
DIM C(M)
LET C(0)=1
for K=1 to M
FOR J=K TO 1 STEP -1
LET C(J)=(C(J)+C(J-1))/2
NEXT j
NEXT k
for J=1 to M
LET U=U+((-1)^INT(J-1))*C(J)/Lpower(J,X)
! PRINT "\:";INT(J-1)
IF C(J)<1E-53 THEN EXIT FOR
NEXT j
LET fnZeta=U/(1-Lpower(2,(1-X)))
END FUNCTION
EXTERNAL FUNCTION Lpower(n,x)
OPTION ARITHMETIC DECIMAL_HIGH
LET Lpower=LEXP(x*LLOG(N))
END FUNCTION
EXTERNAL FUNCTION LLOG(X)
OPTION ARITHMETIC DECIMAL_HIGH
IF X<=0 THEN
CAUSE EXCEPTION 3004
ELSEIF X<1 THEN
LET LLOG=-LLOG(1/X)
ELSEIF X>3 THEN
LET LLOG=2*LLOG(SQR(X))
ELSE ! 1<=x<=3
LET H=(X-1)/(X+1) ! 0<=h<=0.5
LET T=0
LET N=1
LET K=H
LET H2=H^2
DO
LET T=T+K/N
LET N=N+2
LET K=K*H2
LOOP UNTIL K<=1E-120
LET LLOG=2*T
END IF
END FUNCTION
!1000桁モードで利用する指数関数
EXTERNAL FUNCTION LEXP(x)
OPTION ARITHMETIC DECIMAL_HIGH
FUNCTION s(y,n)
LET t=y*x/n
IF ABS(t)<=EPS(0) THEN
LET s=y+t
ELSE
LET s=y+s(t,n+1)
END IF
END FUNCTION
LET LEXP=s(1,1)
END FUNCTION
---------------------------
PUBLIC NUMERIC KETA
INPUT X !' X>1
LET KETA=15
LET XK=10^KETA*X
LET Y=PI/2/AGM(1,4/XK)-KETA*LOG(10)
!'LET Y=PI/2/AGM(1,4/X*10^(-KETA))-PI/2/AGM(1,4*10^(-KETA))
!'LET K=ROUND(LOG(10)*KETA,0)
!'LET XK=EXP(K)*X
!'LET Y=PI/2/AGM(1,4/XK)-K
PRINT Y,LOG(X)
END
EXTERNAL FUNCTION AGM(A,B)
LET N=10^(-KETA/2)
DO WHILE ABS(A-B)>N*ABS(A)
LET Y=A
LET A=(A+B)/2
LET B=SQR(Y*B)
LOOP
LET AGM=(A+B)/2
END FUNCTION
-------------------------------------------------------------
PUBLIC NUMERIC KETA
LET KETA=15
INPUT X
LET N=INT(KETA/LOG10(2))
LET M=0.7
LET H=2^(-N/2)
DO
LET M0=M
LET T0=T(M0)
LET M=M0-H*(T0-X)/(T(M0+H)-T0)
LET M=ABS(M)
LOOP WHILE(ABS(M-M0)>ABS(M)*10^(-KETA+2))
PRINT U(M),LOG(X)
END
EXTERNAL FUNCTION U(M)
LET N=INT(KETA/LOG10(2))
LET A=1
LET B=SQR(1-M)
DO WHILE A-B>2^(-N/2)
LET C=(A+B)/2
LET B=SQR(A*B)
LET A=C
LOOP
LET A=PI/(A+B)
LET S=SQR(M)
DO WHILE 1-S>2^(-N/2)
LET A=A*(1+S)/2
LET S=2*SQR(S)/(1+S)
LOOP
LET U=(A*(1+S)/2)
END FUNCTION
EXTERNAL FUNCTION T(M)
LET N=INT(KETA/LOG10(2))
LET V=1
LET S=SQR(M)
DO WHILE 1-S>2^(-N)
LET W=2*S*V/(1+V^2)
LET W=W/(1+SQR(1-W^2))
LET W=(V+W)/(1-V*W)
LET V=W/(1+SQR(1+W^2))
LET S=2*SQR(S)/(1+S)
LOOP
LET T=(1+V)/(1-V)
END FUNCTION
-------------------------------------------------------------
INPUT X
LET A=1
LET B=4/X
DO WHILE 1+SQR(B)>1
LET B=B/EXP(1)
LET D=D+1
LOOP
DO WHILE ABS(A-B)>1E-15
LET LAST=A
LET A=(A+B)/2
LET B=SQR(LAST*B)
LOOP
PRINT PI/(A+B)-D,LOG(X)
END
-------------------------------------------------------------
INPUT X !' X>1
LET KETA=15
LET Q=1/X
LET SG=-1
LET QN=Q
LET T3=Q
LET T0=Q
LET Q2=Q^2
LET QN2=Q2*Q
LET N=INT(KETA/LOG10(2))
LET C=0
DO WHILE QN*QN2>2^(-N)
LET C=C+1
LET QN=QN*QN2
LET T0=T0+SG*QN
LET T3=T3+QN
LET SG=-SG
LET QN2=QN2*Q2
LOOP
LET T0=1-2*T0
LET T3=1+2*T3
LET B=SQR(1-(T0/T3)^4)
LET A=1
LET C2=0
DO WHILE A-B>2^(-N/2)
LET C2=C2+1
LET T0=(A+B)/2
LET B=SQR(A*B)
LET A=T0
LOOP
LET A=(A+B)/2
LET Y=PI/(A*T3^2)
PRINT Y,LOG(X)
END
-------------------------------------------------------------
INPUT PROMPT "X=":X
LET S=(X-1/X)/2
LET C=(X+1/X)/2
DO WHILE ABS(1-C)>1E-15
LET C=SQR((1+C)/2)
LET S=S/C
LOOP
PRINT S,LOG(X)
LET XX=X
LET P=.5
DO WHILE ABS(X-1)>1E-10
LET X=SQR(X)
LET P=2*P
LOOP
LET S=P*(X-1/X)
PRINT S,LOG(XX)
END
-------------------------------------------------------------
INPUT PROMPT "X=":T
LET XX=T
DO
LET X=XX
LET XX=X+EXP(-X)*T-1
LOOP UNTIL ABS(X-XX)<1E-15
PRINT XX,LOG(T)
END
-------------------------------------------------------------
INPUT X
FOR J=100 TO 1 STEP -1
LET S=J/(2+J/((2*J+1)/(X-1)+S))
NEXT J
PRINT 1/(1/(X-1)+S),LOG(X)
END
-------------------------------------------------------------
OPTION ARITHMETIC COMPLEX
LET I=SQR(-1)
LET Z=.5
PRINT -I*LLOG(I*Z+SQR(1-Z*Z)) !'ASIN(X)
PRINT I*LLOG(Z-I*SQR(1-Z*Z)) !'ACOS(X)
PRINT I/2*(LLOG(1-I*Z)-LLOG(1+I*Z)) !'ATAN(X)
PRINT -I*LLOG(SQR(1-1/Z/Z)+I/Z) !'ACOSEC(X)
PRINT -I*LLOG(I*SQR(1-1/Z/Z)+1/Z) !'ASEC(X)
PRINT I/2*(LLOG(1-I/Z)-LLOG(1+I/Z)) !'ACOTAN(X)
PRINT LLOG(Z+SQR(Z*Z+1)) !'ASINH(X)
PRINT LLOG(Z+SQR(Z+1)*SQR(Z-1)) !'ACOSH(X)
PRINT LLOG((1+Z)/(1-Z))/2 !'ATANH(X)
PRINT LLOG(1/Z+SQR(1/Z/Z+1)) !'ACOSECH(X)
PRINT LLOG(1/Z+SQR(1/Z+1)*SQR(1/Z-1)) !'ASECH(X)
PRINT LLOG((Z+1)/(Z-1))/2 !'ACOTANH(X)
END
EXTERNAL FUNCTION LLOG(X)
OPTION ARITHMETIC COMPLEX
FOR J=100 TO 1 STEP -1
LET S=J/(2+J/((2*J+1)/(X-1)+S))
NEXT J
LET LLOG=1/(1/(X-1)+S)
END FUNCTION
LET A=2 !' x=a+bε
LET B=1
DIM K(0 TO 3)
FOR I=3 TO 0 STEP -1
READ K(I)
NEXT I
DATA 8,6,4,1 !'多項式 f(x)=8*x^3+6*x^2+4*x+1
FOR I=3 TO 0 STEP -1
CALL HORNER(YR,YI,A,B,K(I))
NEXT I
PRINT "f(";A;")=";YR,F(A)
PRINT "f'(";A;")=";YI/B,DF(A)
END
EXTERNAL SUB HORNER(YR,YI,XR,XI,A)
LET XX=XR*YR
LET YY=YR*XI+YI*XR
LET YR=XX+A
LET YI=YY
END SUB
EXTERNAL FUNCTION F(X)
LET F=8*X^3+6*X^2+4*X+1
END FUNCTION
EXTERNAL FUNCTION DF(X)
LET DF=24*X^2+12*X+4
END FUNCTION
EXTERNAL SUB MUL(S(),A(),B()) !'掛け算
LET S(0)=A(0)*B(0)-A(1)*B(1)-A(2)*B(2)-A(3)*B(3)
LET S(1)=A(0)*B(1)+A(1)*B(0)+A(2)*B(3)-A(3)*B(2)
LET S(2)=A(0)*B(2)-A(1)*B(3)+A(2)*B(0)+A(3)*B(1)
LET S(3)=A(0)*B(3)+A(1)*B(2)-A(2)*B(1)+A(3)*B(0)
LET S(4)=A(0)*B(4)-A(1)*B(5)-A(2)*B(6)-A(3)*B(7)+A(4)*B(0)-A(5)*B(1)-A(6)*B(2)-A(7)*B(3)
LET S(5)=A(0)*B(5)+A(1)*B(4)+A(2)*B(7)-A(3)*B(6)+A(4)*B(1)+A(5)*B(0)+A(6)*B(3)-A(7)*B(2)
LET S(6)=A(0)*B(6)-A(1)*B(7)+A(2)*B(4)+A(3)*B(5)+A(4)*B(2)-A(5)*B(3)+A(6)*B(0)+A(7)*B(1)
LET S(7)=A(0)*B(7)+A(1)*B(6)-A(2)*B(5)+A(3)*B(4)+A(4)*B(3)+A(5)*B(2)-A(6)*B(1)+A(7)*B(0)
END SUB
!π(x)素数判定
OPTION ARITHMETIC RATIONAL !有理数モード
LET t0=TIME
LET K9=2000000
DIM A(k9)
OPEN #1:NAME"prime_200.txt",ACCESS INPUT
FOR i=1 TO K9
INPUT #1: A(i)
NEXT i
CLOSE #1
PRINT TIME-t0;"秒で読み込み完了"
PRINT "素数階乗計算開始です。"
LET m1=1
LET m2=1
LET m3=1
LET m4=1
LET m5=1
LET m6=1
LET m7=1
LET m8=1
LET m9=1
LET m10=1
LET m11=1
LET m12=1
LET m13=1
LET m14=1
LET m15=1
LET m16=1
LET m17=1
LET m18=1
LET m19=1
LET m20=1
LET m21=1
LET m22=1
LET m23=1
LET m24=1
LET m25=1
LET m26=1
LET m27=1
LET m28=1
LET m29=1
LET m30=1
LET m31=1
LET m32=1
LET m33=1
LET m34=1
LET m35=1
LET m36=1
LET m37=1
LET m38=1
LET m39=1
LET m40=1
FOR n=2 TO K9
SELECT CASE n
CASE 2 TO 50000
LET m1=m1*A(n)
CASE 50001 TO 100000
LET m2=m2*A(n)
CASE 100001 TO 150000
LET m3=m3*A(n)
CASE 150001 TO 200000
LET m4=m4*A(n)
CASE 200001 TO 250000
LET m5=m5*A(n)
CASE 250001 TO 300000
LET m6=m6*A(n)
CASE 300001 TO 350000
LET m7=m7*A(n)
CASE 350001 TO 400000
LET m8=m8*A(n)
CASE 400001 TO 450000
LET m9=m9*A(n)
CASE 450001 TO 500000
LET m10=m10*A(n)
CASE 500001 TO 550000
LET m11=m11*A(n)
CASE 550001 TO 600000
LET m12=m12*A(n)
CASE 600001 TO 650000
LET m13=m13*A(n)
CASE 650001 TO 700000
LET m14=m14*A(n)
CASE 700001 TO 750000
LET m15=m15*A(n)
CASE 750001 TO 800000
LET m16=m16*A(n)
CASE 800001 TO 850000
LET m17=m17*A(n)
CASE 850001 TO 900000
LET m18=m18*A(n)
CASE 900001 TO 950000
LET m19=m19*A(n)
CASE 950001 TO 1000000
LET m20=m20*A(n)
CASE 1000001 TO 1050000
LET m21=m21*A(n)
CASE 1050001 TO 1100000
LET m22=m22*A(n)
CASE 1100001 TO 1150000
LET m23=m23*A(n)
CASE 1150001 TO 1200000
LET m24=m24*A(n)
CASE 1200001 TO 1250000
LET m25=m25*A(n)
CASE 1250001 TO 1300000
LET m26=m26*A(n)
CASE 1300001 TO 1350000
LET m27=m27*A(n)
CASE 1350001 TO 1400000
LET m28=m28*A(n)
CASE 1400001 TO 1450000
LET m29=m29*A(n)
CASE 1450001 TO 1500000
LET m30=m30*A(n)
CASE 1500001 TO 1550000
LET m31=m31*A(n)
CASE 1550001 TO 1600000
LET m32=m32*A(n)
CASE 1600001 TO 1650000
LET m33=m33*A(n)
CASE 1650001 TO 1700000
LET m34=m34*A(n)
CASE 1700001 TO 1750000
LET m35=m35*A(n)
CASE 1750001 TO 1800000
LET m36=m36*A(n)
CASE 1800001 TO 1850000
LET m37=m37*A(n)
CASE 1850001 TO 1900000
LET m38=m38*A(n)
CASE 1900001 TO 1950000
LET m39=m39*A(n)
CASE 1950001 TO 2000000
LET m40=m40*A(n)
END SELECT
NEXT n
PRINT "素数階乗計算完了です。"
LET C1=29844570422669
FOR n=10^15+1 TO 10^15+10^5-1 STEP 2
LET f=NUMER(n/m1)
IF n=f THEN ELSE GOTO 10
LET f1=NUMER(n/m2)
IF n=f1 THEN ELSE GOTO 10
LET f2=NUMER(n/m3)
IF n=f2 THEN ELSE GOTO 10
LET f3=NUMER(n/m4)
IF n=f3 THEN ELSE GOTO 10
LET f4=NUMER(n/m5)
IF n=f4 THEN ELSE GOTO 10
LET f5=NUMER(n/m6)
IF n=f5 THEN ELSE GOTO 10
LET f6=NUMER(n/m7)
IF n=f6 THEN ELSE GOTO 10
LET f7=NUMER(n/m8)
IF n=f7 THEN ELSE GOTO 10
LET f8=NUMER(n/m9)
IF n=f8 THEN ELSE GOTO 10
LET f9=NUMER(n/m10)
IF n=f9 THEN ELSE GOTO 10
LET f10=NUMER(n/m11)
IF n=f10 THEN ELSE GOTO 10
LET f11=NUMER(n/m12)
IF n=f11 THEN ELSE GOTO 10
LET f12=NUMER(n/m13)
IF n=f12 THEN ELSE GOTO 10
LET f13=NUMER(n/m14)
IF n=f13 THEN ELSE GOTO 10
LET f14=NUMER(n/m15)
IF n=f14 THEN ELSE GOTO 10
LET f15=NUMER(n/m16)
IF n=f15 THEN ELSE GOTO 10
LET f16=NUMER(n/m17)
IF n=f16 THEN ELSE GOTO 10
LET f17=NUMER(n/m18)
IF n=f17 THEN ELSE GOTO 10
LET f18=NUMER(n/m19)
IF n=f18 THEN ELSE GOTO 10
LET f19=NUMER(n/m20)
IF n=f19 THEN ELSE GOTO 10
LET f20=NUMER(n/m21)
IF n=f20 THEN ELSE GOTO 10
LET f21=NUMER(n/m22)
IF n=f21 THEN ELSE GOTO 10
LET f22=NUMER(n/m23)
IF n=f22 THEN ELSE GOTO 10
LET f23=NUMER(n/m24)
IF n=f23 THEN ELSE GOTO 10
LET f24=NUMER(n/m25)
IF n=f24 THEN ELSE GOTO 10
LET f25=NUMER(n/m26)
IF n=f25 THEN ELSE GOTO 10
LET f26=NUMER(n/m27)
IF n=f26 THEN ELSE GOTO 10
LET f27=NUMER(n/m28)
IF n=f27 THEN ELSE GOTO 10
LET f28=NUMER(n/m29)
IF n=f28 THEN ELSE GOTO 10
LET f29=NUMER(n/m30)
IF n=f29 THEN ELSE GOTO 10
LET f30=NUMER(n/m31)
IF n=f30 THEN ELSE GOTO 10
LET f31=NUMER(n/m32)
IF n=f31 THEN ELSE GOTO 10
LET f32=NUMER(n/m33)
IF n=f32 THEN ELSE GOTO 10
LET f33=NUMER(n/m34)
IF n=f33 THEN ELSE GOTO 10
LET f34=NUMER(n/m35)
IF n=f34 THEN ELSE GOTO 10
LET f35=NUMER(n/m36)
IF n=f35 THEN ELSE GOTO 10
LET f36=NUMER(n/m37)
IF n=f36 THEN ELSE GOTO 10
LET f37=NUMER(n/m38)
IF n=f37 THEN ELSE GOTO 10
LET f38=NUMER(n/m39)
IF n=f38 THEN ELSE GOTO 10
LET f39=NUMER(n/m40)
IF n=f39 THEN ELSE GOTO 10
IF n=f AND n=f1 AND n=f2 AND n=f3 AND n=f4 AND n=f5 AND n=f6 AND n=f7 AND n=f8 AND n=f9 AND n=f10 AND n=f11 AND n=f12 AND n=f13 AND n=f14 AND n=f15 AND n=f16 AND n=f17 AND n=f18 AND n=f19 AND n=f20 AND n=f21 AND n=f22 AND n=f23 AND n=f24 AND n=f25 AND n=f26 AND n=f27 AND n=f28 AND n=f29 AND n=f30 AND n=f31 AND n=f32 AND n=f33 AND n=f34 AND n=f35 AND n=f36 AND n=f37 AND n=f38 AND n=f39 THEN
LET C=C+1
PRINT n;":";c+c1;":";c
END IF
10 NEXT n
PRINT c;"個"
LET t1=TIME-t0
PRINT USING "----%.####":t1;
PRINT "秒"
PRINT TIME-t0;"秒で計算しました"
END
------------------------------
素数リスト作成プログラム
------------------------------
!サンダラムの篩
OPTION ARITHMETIC NATIVE !2進モード
LET t0=TIME
!PRINT 2
OPEN #1:NAME "prime_200.txt",RECTYPE INTERNAL
ERASE #1
WRITE #1:2
LET L=32452868/2 !計算結果は2倍の数値になります。
DIM P(L)
LET b=1
LET k=0.7
FOR a=3 TO INT(L*k) STEP 2
LET f=f+1
FOR N=1 TO f STEP 1
LET z=a*n+b
! PRINT STR$(z)&","
IF Z>L THEN GOTO 100
LET P(z)=1
NEXT n
100 LET b=b+1
! PRINT "a=";a;"b=";b-1
NEXT a
FOR i=1 TO L-1
IF P(i)=0 THEN
LET z=I*2+1
WRITE #1:z
END IF
!PRINT i*2+1
NEXT i
------------------------------
計算方法の仕組み
------------------------------
OPTION ARITHMETIC RATIONAL !有理数モード
LET c=12
LET m1=3*5*7*11*13*17
LET m2=19*23*29*31*37
FOR n=37 TO 41^2-1 STEP 2
LET x=n/m1
LET f=NUMER(x)
LET y=n/m2
LET f1=NUMER(y)
IF n=f AND n=f1 THEN
LET C=C+1
PRINT n;":";c
END IF
NEXT n
END
----------------------------
OPTION ARITHMETIC RATIONAL
LET KMAX=500
DIM SOSU(KMAX)
LET SOSU(1)=3
LET SOSU(2)=5
LET SOSU(3)=7
LET K=3
LET P=1
LET NUM=4
FOR I=1 TO KMAX-1
LET P=P*SOSU(I)
FOR J=SOSU(I)^2+2 TO SOSU(I+1)^2-2 STEP 2
IF MOD(J,10)<>5 THEN
IF NUMER(J/P)=J THEN
LET NUM=NUM+1
PRINT NUM;":";J
IF K<KMAX THEN
LET K=K+1
LET SOSU(K)=J
END IF
END IF
END IF
NEXT J
NEXT I
END
OPTION ARITHMETIC NATIVE
LET KMAX=500
DIM SOSU(KMAX)
LET SOSU(1)=3
LET SOSU(2)=5
LET SOSU(3)=7
LET K=3
LET P=1
LET NUM=4
!'OPEN #1:NAME "sosu.txt"
FOR I=1 TO KMAX-1
FOR J=SOSU(I)^2+2 TO SOSU(I+1)^2-2 STEP 2
IF MOD(J,10)<>5 THEN
LET FL=0
FOR P=1 TO I !'ループ
IF MOD(J,SOSU(P))=0 THEN
LET FL=1
EXIT FOR !'打ち切り
END IF
NEXT P
IF FL=0 THEN
LET NUM=NUM+1
PRINT NUM;":";J
IF K<KMAX THEN
LET K=K+1
LET SOSU(K)=J
!' WRITE #1:J
!'ELSE
!' CLOSE #1
!' STOP
END IF
END IF
END IF
NEXT J
NEXT I
END
テスト機AMD Athlon 64 3800+ (2.4GHz) Win8.1 32bt
BASIC Acc 計算結果
----------------------------
エラトステネスの奇数& 6n±1 篩
1026167 : 80426
249.841 秒
----------------------------
試割&6n±1 primenumber
1026167 : 80426
252.731000000007 秒
----------------------------
Sieve of Sundaram
1026167 : 80426
251.246999999996 秒
----------------------------
!エラトステネスの奇数& 6n±1 篩
OPTION ARITHMETIC NATIVE
LET t0=TIME
PRINT " 2 : 1"
LET Kmin=1 !99991(9592nd prime) 999983(78498th prime)
LET KMAX=Kmin-1+1.E6+26167 !99999989(5761455th prime)
LET C=1 !Kmin以下の素数の個数
DIM s(Kmin TO KMAX)
MAT s=ZER
FOR n=3 TO KMAX STEP 2
IF N>3 AND MOD(n,3)=0 OR N>5 AND MOD(n,10)=5 THEN GOTO 10
IF n < Kmin THEN GOTO 10
IF s(n)=0 THEN
LET C=C+1
PRINT n;":";c
END IF
10 FOR k=n^2 TO KMAX STEP n
IF K < Kmin THEN GOTO 20
LET s(k)=1
20 NEXT k
NEXT n
PRINT TIME-t0;"秒"
END
----------------------------------
!試割&6n±1 primenumber
OPTION ARITHMETIC NATIVE
LET t0=TIME
LET KMAX=169
DIM SOSU(KMAX)
LET SOSU(1)=3
LET SOSU(2)=5
LET SOSU(3)=7
LET NUM=4
LET K=3
FOR I=1 TO KMAX-1
FOR J=SOSU(I)^2+2 TO SOSU(I+1)^2-2 STEP 2
IF MOD(J,3)=0 OR MOD(J,10)=5 THEN GOTO 10
FOR P=3 TO I
IF MOD(J,SOSU(P))=0 THEN GOTO 10
NEXT p
LET NUM=NUM+1
PRINT J;":";NUM
IF K<KMAX THEN
LET K=K+1
LET SOSU(K)=J
END IF
10 NEXT j
NEXT i
PRINT TIME-t0;"秒"
END
----------------------------------
!Sieve of Sundaram
OPTION ARITHMETIC NATIVE
LET t0=TIME
LET L=513084 !計算結果は2倍の数値になります。
LET C=1
DIM P(L)
LET b=1
LET k=0.7
FOR a=3 TO INT(L*k) STEP 2
LET f=f+1
FOR N=1 TO f STEP 1
LET z=a*n+b
IF Z>L THEN GOTO 100
LET P(z)=1
NEXT n
100 LET b=b+1
NEXT a
FOR i=1 TO L-1
IF P(i)=0 THEN
LET z=I*2+1
LET c=c+1
PRINT z;":";c
END IF
NEXT i
PRINT TIME-t0;"秒"
END
-------------------------------------
!エラトステネスの奇数& 6n±1 篩 は1億以上での動作も確認しました。
!エラトステネスの奇数& 6n±1 篩
OPTION ARITHMETIC NATIVE
LET t0=TIME
!PRINT " 2 : 1"
LET Kmin=1.E9 !99991(9592nd prime) 999983(78498th prime)
LET KMAX=Kmin+1.E6 !99999989(5761455th prime) 999999937(50847534th prime)
LET C=50847534 !Kmin以下の素数の個数
DIM s(Kmin TO KMAX)
MAT s=ZER
FOR n=3 TO KMAX STEP 2
IF N>3 AND MOD(n,3)=0 OR N>5 AND MOD(n,10)=5 THEN GOTO 10
IF n < Kmin THEN GOTO 10
IF s(n)=0 THEN
LET C=C+1
PRINT n;":";c
END IF
10 FOR k=n^2 TO KMAX STEP n
IF K < Kmin THEN GOTO 20
LET s(k)=1
20 NEXT k
NEXT n
PRINT TIME-t0;"秒"
END
-------------------------------------
OPTION BASE 0
LET KMAX=100000
DIM A(KMAX),B(200),C(200)
FOR I=2 TO KMAX
IF A(I)=0 THEN
FOR J=I*I TO KMAX STEP I !'エラトステネスの篩
LET A(J)=1 !'倍数に印をつける
NEXT J
END IF
NEXT I
FOR I=2 TO KMAX
IF A(I)=1 THEN !'素数でないなら
CALL CALC(I,B,P,L1)
CALL CALC(P,C,Q,L2)
IF I=Q AND I<=P THEN !'友愛数の時、完全数含む
PRINT I;":";
FOR K=0 TO L1-1
PRINT B(K);
NEXT K
PRINT
PRINT P;":";
FOR K=0 TO L2-1
PRINT C(K);
NEXT K
PRINT
PRINT
END IF
END IF
NEXT I
END
EXTERNAL SUB CALC(K,B(),SUM,L) !'Kの約数の和を求める
MAT B=ZER
LET L=0
LET SUM=1 !' SUM=0 ...婚約数 or SUM=1 ...友愛数
IF SUM=1 THEN
LET B(0)=1
LET L=L+1
END IF
FOR J=2 TO INT(SQR(K))
LET R=MOD(K,J)
IF R=0 THEN
LET SUM=SUM+J
LET B(L)=J
LET L=L+1
IF J<>K/J THEN !'平方数でないなら
LET SUM=SUM+K/J
LET B(L)=K/J
LET L=L+1
END IF
END IF
NEXT J
END SUB
OPTION ARITHMETIC RATIONAL
LET N=18446744073709551617
!'INPUT N
LET X=2
LET Y=2
LET D=1
DO WHILE D=1
LET X=F(X,N)
LET Y=F(F(Y,N),N)
LET D=GCD(ABS(X-Y),N)
LOOP
IF D<>N THEN PRINT D,N/D ELSE PRINT "失敗"
END
EXTERNAL FUNCTION F(X,N)
OPTION ARITHMETIC RATIONAL
LET C=1
LET F=MOD(X*X+C,N)
END FUNCTION
-----------------------------------------------------------------
OPTION ARITHMETIC RATIONAL
RANDOMIZE
LET N=10023859281455311421
!'INPUT N
LET X0=INT(RND*N)
LET M=INT(RND*N)
LET Y=X0
LET R=1
LET A=1
DO
LET X=Y
FOR I=1 TO R
LET Y=F(Y,N)
NEXT I
LET K=0
DO
LET YS=Y
FOR I=1 TO MIN(M,R-K)
LET Y=F(Y,N)
LET A=MOD(A*ABS(X-Y),N)
NEXT I
LET G=GCD(A,N)
LET K=K+M
LOOP UNTIL K>R OR G>1
LET R=2*R
LOOP UNTIL G>1
IF G=N THEN
DO
LET YS=F(YS,N)
LET G=GCD(ABS(X-YS),N)
LOOP UNTIL G>1
END IF
IF G=N THEN PRINT "失敗" ELSE PRINT G,N/G
END
EXTERNAL FUNCTION F(X,N)
OPTION ARITHMETIC RATIONAL
LET C=1
LET F=MOD(X*X+C,N)
END FUNCTION
FOR N=3 TO 10
PRINT N;"角数"
FOR X=1 TO 10
PRINT X;":";POLYGONALNUMBER(N,X)
NEXT X
PRINT
NEXT N
FOR X=2 TO 100
FOR N=3 TO 20
IF ISPOLYGONALNUMBER(N,X)<>0 THEN PRINT X;":";N;"角数"
NEXT N
NEXT X
END
EXTERNAL FUNCTION POLYGONALNUMBER(N,X) !'N角数
LET POLYGONALNUMBER=((N-2)*X^2-(N-4)*X)/2
END FUNCTION
EXTERNAL FUNCTION ISTRIANGULARNUMBER(X) !'三角数かどうか
LET S=(SQR(8*X+1)-1)/2
IF FP(S)=0 THEN LET ISTRIANGULARNUMBER=1 ELSE LET ISTRIANGULARNUMBER=0
END FUNCTION
EXTERNAL FUNCTION ISPOLYGONALNUMBER(N,M) !'多角数かどうか
LET X1=(SQR(N^2+(8*M-8)*N-16*M+16)+N-4)/(2*N-4)
!'LET X2=(-SQR(N^2+(8*M-8)*N-16*M+16)-N+4)/(2*N-4) !' X2<0
IF FP(X1)=0 THEN LET ISPOLYGONALNUMBER=1 ELSE LET ISPOLYGONALNUMBER=0
END FUNCTION
OPTION ARITHMETIC COMPLEX
FOR X=3 TO 200
FOR N=3 TO 8
IF ISPYRAMIDALNUMBER(N,X)<>0 THEN
PRINT X;":";N;"角錐数"
END IF
NEXT N
NEXT X
END
EXTERNAL FUNCTION ISPYRAMIDALNUMBER(N,M) !'N角錐数かどうか
OPTION ARITHMETIC COMPLEX
LET I=SQR(-1)
LET K1 = ((-(SQR(3)*I)/2)-1/2)*(SQR((-4*N^4)+68*N^3-((-972*M^2)+324*M+429)*N^2-(3888*M^2-2268*M-1190)*N+3888*M^2-3888*M-1225)/(2*3^(3/2)*(N-2)^2)+(M*(6*N^2-24*N+24)-N^2+7*N-12)/(2*N^3-12*N^2+24*N-16))^(1/3)+(((SQR(3)*I)/2-1/2)*(N^2-7*N+13))/((3*N^2-12*N+12)*(SQR((-4*N^4)+68*N^3-((-972*M^2)+324*M+429)*N^2-(3888*M^2-2268*M-1190)*N+3888*M^2-3888*M-1225)/(2*3^(3/2)*(N-2)^2)+(M*(6*N^2-24*N+24)-N^2+7*N-12)/(2*N^3-12*N^2+24*N-16))^(1/3))-1/(N-2)
LET K2 = ((SQR(3)*I)/2-1/2)*(SQR((-4*N^4)+68*N^3-((-972*M^2)+324*M+429)*N^2-(3888*M^2-2268*M-1190)*N+3888*M^2-3888*M-1225)/(2*3^(3/2)*(N-2)^2)+(M*(6*N^2-24*N+24)-N^2+7*N-12)/(2*N^3-12*N^2+24*N-16))^(1/3)+(((-(SQR(3)*I)/2)-1/2)*(N^2-7*N+13))/((3*N^2-12*N+12)*(SQR((-4*N^4)+68*N^3-((-972*M^2)+324*M+429)*N^2-(3888*M^2-2268*M-1190)*N+3888*M^2-3888*M-1225)/(2*3^(3/2)*(N-2)^2)+(M*(6*N^2-24*N+24)-N^2+7*N-12)/(2*N^3-12*N^2+24*N-16))^(1/3))-1/(N-2)
LET K3 = (SQR((-4*N^4)+68*N^3-((-972*M^2)+324*M+429)*N^2-(3888*M^2-2268*M-1190)*N+3888*M^2-3888*M-1225)/(2*3^(3/2)*(N-2)^2)+(M*(6*N^2-24*N+24)-N^2+7*N-12)/(2*N^3-12*N^2+24*N-16))^(1/3)+(N^2-7*N+13)/((3*N^2-12*N+12)*(SQR((-4*N^4)+68*N^3-((-972*M^2)+324*M+429)*N^2-(3888*M^2-2268*M-1190)*N+3888*M^2-3888*M-1225)/(2*3^(3/2)*(N-2)^2)+(M*(6*N^2-24*N+24)-N^2+7*N-12)/(2*N^3-12*N^2+24*N-16))^(1/3))-1/(N-2)
IF (FP(ABS(RE(K1)))<1E-8 OR 1-FP(ABS(RE(K1)))<1E-8) AND FP(IM(K1))=0 OR (FP(ABS(RE(K2)))<1E-8 OR 1-FP(ABS(RE(K2)))<1E-8) AND FP(IM(K2))=0 OR (FP(ABS(RE(K3)))<1E-8 OR 1-FP(ABS(RE(K3)))<1E-8) AND FP(IM(K3))=0 THEN LET ISPYRAMIDALNUMBER=1 ELSE LET ISPYRAMIDALNUMBER=0
END FUNCTION
INPUT PROMPT "人数:":N
DO
IF R<20 THEN
LET R=R+1
ELSEIF R<200 THEN
LET R=R+10
ELSEIF R<2000 THEN
LET R=R+100
ELSEIF R<20000 THEN
LET R=R+1000
ELSEIF R<200000 THEN
LET R=R+10000
ELSE
LET R=R+100000
END IF
LET P=1-((3^(N-1)-2^N+2)/(3^(N-1)))^R
PRINT R;"回目";P*100;"%"
LOOP UNTIL P>.99
END
FOR X=0 TO 10
FOR Y=-10 TO 10
LET A=(X^2+9*X*Y-Y^2)
LET B=(12*X^2-4*X*Y+2*Y^2)
LET C=(9*X^2-7*X*Y-Y^2)
LET D=(10*X^X+2*Y^2)
IF A^3+B^3=C^3+D^3 AND A<C THEN
PRINT A;"^ 3 +";B;"^ 3 = ";C;"^ 3 +";D;"^ 3 =";A^3+B^3
END IF
NEXT Y
NEXT X
END
INPUT N !' N=196,295,394,493,592,689,691,788,790,879,887,978,986...
DO
LET NUM=NUM+1
LET K=REVERSE(N)
PRINT NUM;":";N;"+";K;"=";N+K
LET N=N+K
LOOP UNTIL N=REVERSE(N) OR NUM>=300
END
EXTERNAL FUNCTION REVERSE(X)
DO
LET N=MOD(X,10)
LET Y=Y*10+N
LET X=INT(X/10)
LOOP UNTIL X=0
LET REVERSE=Y
END FUNCTION
OPTION ARITHMETIC COMPLEX
FOR I=1 TO 10
LET X=COMPLEX(I,0)
PRINT X;"!!=";(2/PI)^((1-CCOS(PI*X))/4)*2^(X/2)*GAMMA(1+X/2)
NEXT I
END
EXTERNAL FUNCTION CCOS(Z) !'cosine
OPTION ARITHMETIC COMPLEX
LET X=RE(Z)
LET Y=IM(Z)
LET XR=COS(X)*COSH(Y)
LET XI=-SIN(X)*SINH(Y)
LET CCOS=COMPLEX(XR,XI)
END FUNCTION
EXTERNAL FUNCTION GAMMA(X) !'ガンマ関数
OPTION ARITHMETIC COMPLEX
LET GAMMA=EXP(LOGGAMMA(X))
END FUNCTION
EXTERNAL FUNCTION LOGGAMMA(X)
OPTION ARITHMETIC COMPLEX
LET S=(X-.5)*LOG(X)-X+LOG(2*PI)/2
LET A=1/X
FOR N=1 TO 5
LET S=S+BERNOULLI(2*N)/(2*N)/(2*N-1)*A
LET A=A/X/X
NEXT N
LET LOGGAMMA=S
END FUNCTION
EXTERNAL FUNCTION BERNOULLI(K) !'ベルヌーイ数
OPTION ARITHMETIC COMPLEX
LET S=1
LET C=K+1
FOR N=2 TO K+1
LET C=C*(N-K-2)/N
LET H=H+C*S/N
LET S=S+N^K
NEXT N
LET BERNOULLI=H
END FUNCTION
----------------------------------------------------------
OPTION ARITHMETIC RATIONAL
LET M=2
FOR N=0 TO 50
LET A=1
FOR I=N TO 1 STEP -M
LET A=A*I
NEXT I
PRINT STR$(N);REPEAT$("!",M);" : ";A
NEXT N
END
!'男性: 13.397×体重kg+4.799×身長cm-5.677×年齢+88.362
!'女性: 9.247×体重kg+3.098×身長cm-4.33×年齢+447.593
INPUT PROMPT "男性(1) 女性(2)":性別
INPUT PROMPT "年齢":年齢
INPUT PROMPT "身長(cm)":身長
INPUT PROMPT "体重(kg)":体重
SELECT CASE 性別
CASE 1
LET カロリ=13.397*体重+4.799*身長-5.677*年齢+88.362
CASE 2
LET カロリ=9.247*体重+3.098*身長-4.33*年齢+447.593
END SELECT
PRINT "基礎代謝量";カロリ;"kcal"
END
INPUT PROMPT "気温(℃)":T
INPUT PROMPT "湿度 (%)":H
LET DI=.81*T+H/100*(.99*T-14.3)+46.3
PRINT "不快指数";DI
SELECT CASE DI
CASE IS<55
PRINT "寒い"
CASE 55 TO 60
PRINT "肌寒い"
CASE 60 TO 65
PRINT "何も感じない"
CASE 65 TO 70
PRINT "快い"
CASE 70 TO 75
PRINT "暑くない"
CASE 75 TO 80
PRINT "やや暑い"
CASE 80 TO 85
PRINT "暑くて汗が出る"
CASE IS>85
PRINT "暑くてたまらない"
END SELECT
END
PUBLIC NUMERIC TH
INPUT PROMPT "角度(度):":TH
LET TH=RAD(TH)
INPUT PROMPT "ひもの長さ(m):":L
LET G=9.80665
LET T=4*SQR(L/G)*INTEGRAL(0,PI/2,100)
PRINT "振り子周期:";T;"秒"
END
EXTERNAL FUNCTION FUNC(X)
LET FUNC=1/SQR(1-SIN(TH/2)^2*SIN(X)^2)
END FUNCTION
EXTERNAL FUNCTION INTEGRAL(A1,B1,N1) !'数値積分
DIM R(0 TO 2)
LET R(0)=1/3
LET R(1)=4/3
LET R(2)=1/3
LET H1=(B1-A1)/N1/2
FOR K1=0 TO N1-1
FOR J1=0 TO 2
LET S=S+R(J1)*H1*FUNC(A1+H1*(2*K1+J1))
NEXT J1
NEXT K1
LET INTEGRAL=S
END FUNCTION
2進モード(浮動小数点による数値計算)
LET S=0
FOR A=0.001 TO 0.009 STEP 0.001
LET S=S+A
NEXT A
PRINT S
END
や
LET S=0
LET A=0.001
DO WHILE A<=0.009
LET S=S+A
LET A=A+0.001
LOOP
PRINT S
END
は、最後の0.009が加味されないので、正しく計算できません。
LET S=0
FOR A=1 TO 9
LET S=S+A
NEXT A
PRINT S/1000
END
LET N=3 !2n
LET M=2*N
DIM A(M)
FOR i=1 TO M !最初の並び
LET A(i)=i
NEXT i
DIM X(M+1) !位置 ※
CALL try(1,N,A,X)
END
EXTERNAL SUB try(K,N,A(),X())
LET M=2*N
DIM B(M)
FOR i=2 TO N+1 !交換位置を決める
LET X(K)=i
MAT B=A !シャッフル
FOR J=1 TO N
LET B(J)=A(i+J-1)
NEXT J
FOR J=1 TO i-1
LET B(J+N)=A(J)
NEXT J
FOR J=2 TO M !逆に並んだか確認する
IF B(J-1)<B(J) THEN EXIT FOR
NEXT J
IF J>M THEN !結果を表示する
PRINT K
MAT PRINT X;
ELSE
IF K<UBOUND(X) THEN CALL try(K+1,N,B,X) !深さ優先
END IF
LET X(K)=0
NEXT i
END SUB
FOR I=100 TO 10000
LET K=1
DO
LET N=I
LET S=0
LET K=K+1
DO
LET S=S+MOD(N,10)^K
LET N=INT(N/10)
LOOP UNTIL N=0 OR S>I
IF S=I THEN
LET A$=STR$(I)
FOR J=1 TO LEN(A$)-1
PRINT A$(J:J);" ^";K;" + ";
NEXT J
PRINT RIGHT$(A$,1);" ^";K;" =";I
END IF
LOOP UNTIL S>=I OR K>10
NEXT I
END
FOR I=1 TO 10000
LET P1=6*I-1
LET P2=6*I+1
LET FL=0
FOR J=3 TO SQR(P2) STEP 2
IF MOD(P1,J)=0 OR MOD(P2,J)=0 THEN
LET FL=1
EXIT FOR
END IF
NEXT J
IF FL=0 THEN
LET L=L+1
PRINT L;":";P1;P2
END IF
NEXT I
END
!'3779:素数 3779 7793 7937 9377
LET KMAX=10000
DIM A(KMAX)
LET A(1)=1
FOR I=2 TO KMAX
IF A(I)=0 THEN
FOR J=I*I TO KMAX STEP I
LET A(J)=1
NEXT J
END IF
NEXT I
FOR I=11 TO KMAX
IF A(I)=0 THEN
LET S$=STR$(I)
LET N=LEN(S$)
LET FL=0
FOR J=1 TO N-1
LET S$=S$(2:N)&S$(1:1) !'回転
LET L=VAL(S$)
IF A(L)<>0 THEN
LET FL=1
EXIT FOR
END IF
NEXT J
IF FL=0 THEN
PRINT I
LET A(I)=1
END IF
END IF
NEXT I
END
!' 3797:素数 左から 3 37 379 3797,右から 7 97 797 3797
LET KMAX=10000
DIM A(KMAX)
LET A(1)=1
FOR I=2 TO KMAX
IF A(I)=0 THEN
FOR J=I*I TO KMAX STEP I
LET A(J)=1
NEXT J
END IF
NEXT I
FOR I=11 TO KMAX
IF A(I)=0 THEN
LET S$=STR$(I)
LET N=LEN(S$)
LET FL=0
FOR J=1 TO N-1
LET L=VAL(LEFT$(S$,J))
LET R=VAL(RIGHT$(S$,J))
IF A(L)<>0 OR A(R)<>0 THEN
LET FL=1
EXIT FOR
END IF
NEXT J
IF FL=0 THEN PRINT I
END IF
NEXT I
END
INPUT PROMPT "(始)西暦 年、月、日、時、分、秒 :":YEAR1,MONTH1,DAY1,HOUR1,MINUTE1,SECOND1
INPUT PROMPT "(終)西暦 年、月、日、時、分、秒 :":YEAR2,MONTH2,DAY2,HOUR2,MINUTE2,SECOND2
LET L1=CALCDAY(YEAR1,MONTH1,DAY1)
LET L2=CALCDAY(YEAR2,MONTH2,DAY2)
LET T1=TOTALTIME(HOUR1,MINUTE1,SECOND1)
LET T2=TOTALTIME(HOUR2,MINUTE2,SECOND2)
LET L=L2-L1
LET T=T2-T1
IF T<0 THEN
LET L=L-1
LET T=T+86400
END IF
CALL CALCTIME(T,HOUR,MINUTE,SECOND)
CALL CALCYMD(INT(L+T/86400),YEAR1,MONTH1,GYEAR,GMONTH,GDAY)
!'CALL CALCYMD2(INT(L+T/86400),CYEAR,CMONTH,CDAY)
PRINT "西暦";YEAR1;"年";MONTH1;"月";DAY1;"日";HOUR1;"時";MINUTE1;"分";SECOND1;"秒から"
PRINT "西暦";YEAR2;"年";MONTH2;"月";DAY2;"日";HOUR2;"時";MINUTE2;"分";SECOND2;"秒までは"
PRINT GYEAR;"年";GMONTH;"ヶ月";GDAY;"日";HOUR;"時間";MINUTE;"分";SECOND;"秒"
!'PRINT CYEAR;"年";CMONTH;"ヶ月";CDAY;"日"
PRINT (L+T/86400)/365.2425;"年"
PRINT (L+T/86400)/(365.2425/12);"ヶ月"
PRINT (L+T/86400)/7;"週"
PRINT L+T/86400;"日"
PRINT L*24+T/3600;"時間"
PRINT L*24*60+T/60;"分"
PRINT L*86400+T;"秒"
END
EXTERNAL FUNCTION CALCDAY(Y,M,N)
DIM D(12),DD(12)
MAT READ D,DD
DATA 0,31,59,90,120,151,181,212,243,273,304,334
DATA 31,28,31,30,31,30,31,31,30,31,30,31
LET YL=Y-1
LET Z=365*YL+D(M)+N+INT(YL/4)+INT(YL/400)-INT(YL/100)
IF (MOD(Y,4)=0 AND MOD(Y,100)<>0 OR MOD(Y,400)=0) AND M>2 THEN !'うるう年
LET Z=Z+1
END IF
LET CALCDAY=Z
END FUNCTION
EXTERNAL SUB CALCTIME(T,HOUR,MINUTE,SECOND)
LET HOUR=INT(T/3600)
LET TT=TT+HOUR*3600
LET MINUTE=INT((T-TT)/60)
LET TT=TT+MINUTE*60
LET SECOND=T-TT
END SUB
EXTERNAL FUNCTION TOTALTIME(HOUR,MINUTE,SECOND)
LET TOTALTIME=HOUR*3600+MINUTE*60+SECOND
END FUNCTION
EXTERNAL SUB CALCYMD2(L,YEAR,MONTH,DAY)
LET YEAR=INT(L/365.2425)
LET LL=LL+INT(365.2425*YEAR)
LET MONTH=INT((L-YEAR*365.2425)/(365.2425/12)+.4)
LET LL=LL+INT(MONTH*(365.2425/12))
LET DAY=L-LL
IF DAY<0 THEN LET DAY=0
END SUB
EXTERNAL SUB CALCYMD(LL,Y1,M1,YEAR,MONTH,DAY)
DIM DD(12)
MAT READ DD
DATA 31,28,31,30,31,30,31,31,30,31,30,31
LET L=LL
LET Y=Y1
LET M=M1
LET YEAR=0
LET MONTH=0
LET DAY=0
IF (MOD(Y,4)=0 AND MOD(Y,100)<>0 OR MOD(Y,400)=0) AND M<3 THEN LET Z=1 ELSE LET Z=0
DO WHILE L-(365+Z)>=0
LET L=L-(365+Z)
LET YEAR=YEAR+1
LET Y=Y+1
IF (MOD(Y,4)=0 AND MOD(Y,100)<>0 OR MOD(Y,400)=0) AND M<3 THEN LET Z=1 ELSE LET Z=0
LOOP
IF (MOD(Y,4)=0 AND MOD(Y,100)<>0 OR MOD(Y,400)=0) AND M=2 THEN LET Z=1 ELSE LET Z=0
DO WHILE L-(DD(M)+Z)>=0
LET L=L-(DD(M)+Z)
LET MONTH=MONTH+1
LET M=M+1
IF M>12 THEN LET M=1
IF (MOD(Y,4)=0 AND MOD(Y,100)<>0 OR MOD(Y,400)=0) AND M=2 THEN LET Z=1 ELSE LET Z=0
LOOP
LET DAY=L-DAY
END SUB
DECLARE EXTERNAL SUB perm
DIM a(20)
LET k=10
MAT a=ZER(k)
FOR i=1 TO k
LET a(i)=i
NEXT i
CALL perm(a,1)
END
EXTERNAL SUB perm(a(),n)
LET m=UBOUND(a)
IF n=m THEN
!!!MAT PRINT a;
LET s=0 !n桁の数
FOR i=1 TO m
LET s=s*10+MOD(a(i),10)
NEXT i
LET t=8*s+1 !平方根の中
IF INT(SQR(t))^2=t THEN PRINT s; (-1+SQR(t))/2 !s,n
ELSE
FOR i=n TO m
LET t=a(i)
FOR j=i-1 TO n STEP -1
LET a(j+1)=a(j)
NEXT j
LET a(n)=t
CALL perm(a,n+1)
LET t=a(n)
FOR j=n TO i-1
LET a(j)=a(j+1)
NEXT j
LET a(i)=t
NEXT i
END IF
END SUB
LET M=100 !101219327 !987789 !10000
LET H=0
LET P=1
DO
LET T=P !回文数を作る
LET X=0 !並びを逆にする
LET K=0 !桁数
DO WHILE T>0
LET X=X*10+MOD(T,10)
LET K=K+1
LET T=INT(T/10)
LOOP
LET A=P*10^K+X !そのまま元の数にくっつける ab…cc…ba
LET B=INT(P/10)*10^K+X !頭の1桁を除いたものを元の数にくっつける ab…c…ba
!!PRINT P;A;B !debug
IF B>M THEN EXIT DO !これ以降は可能性がない
LET H=H+B
IF A<=M THEN LET H=H+A
> USING$関数で書式文字列を空文字列で指定すると[実行時内部エラー]になります。
>
> LET a$=""
> LET x=123.456
> PRINT USING$(a$,x)
> END
>
> PRINT USINGでは空文字列を指定すると[EXTYPE 8202]の例外が発生しますが、USING$でも同様の対応にしていただけないでしょうか。
>
> LET a$=""
> LET x=123.456
> PRINT USING a$ : x
> END
OPTION ARITHMETIC RATIONAL
LET S=10^500+1
LET E=S+10000
FOR I=S TO E STEP 2
LET A$=STR$(I)
IF ISPRIME(A$,100)<>0 THEN
PRINT A$
END IF
NEXT I
END
EXTERNAL FUNCTION ISPRIME(N$,NUM)
OPTION ARITHMETIC RATIONAL
ASSIGN "miller.dll","isprime"
END FUNCTION
EXTERNAL FUNCTION ISPRIME2(N$,NUM)
OPTION ARITHMETIC RATIONAL
ASSIGN "isprime.dll","isprime"
END FUNCTION
---------------------------------------------------------------------------------
miller.cpp
#include <boost/multiprecision/cpp_int.hpp>
using namespace boost::multiprecision;
using namespace std;
cpp_int powmod(cpp_int b,cpp_int p,cpp_int m)
{
cpp_int result=1;
while (p>0) {
if (p % 2==1) result=(result*b) % m;
b=(b*b) % m;
p=p/2;
}
return result;
}
cpp_int atocpp(char *str)
{
cpp_int result = 0;
while (*str>='0' && *str<='9'){
result=(result*10)+(*str++ - '0');
}
return result;
}
!素数判定(666667素数)http://stdkmd.com/nrr/6/66667.htm#N34
OPTION ARITHMETIC RATIONAL !有理数モード
LET t0=TIME
LET Q=7 !1020379 (80000th prime)【変数】
LET k9=80000
DIM Pz(k9)
OPEN #2:NAME "E:\prime_10_8x1v.txt",ACCESS INPUT !素数リスト
FOR i=1 TO k9
INPUT #2: Pz(i)
NEXT i
CLOSE #2
LET m1=1
LET m2=1
LET m3=1
LET m4=1
LET m5=1
LET m6=1
LET m7=1
LET m8=1
LET m9=1
LET m10=1
LET m11=1
LET m12=1
LET m13=1
LET m14=1
LET m15=1
LET m16=1
LET m17=1
LET m18=1
LET m19=1
LET m20=1
LET m21=1
LET m22=1
LET m23=1
LET m24=1
LET m25=1
LET m26=1
LET m27=1
LET m28=1
LET m29=1
LET m30=1
LET m31=1
LET m32=1
LET m33=1
LET m34=1
LET m35=1
LET m36=1
LET m37=1
LET m38=1
LET m39=1
LET m40=1
LET m41=1
LET m42=1
LET m43=1
LET m44=1
LET m45=1
LET m46=1
LET m47=1
LET m48=1
LET m49=1
LET m50=1
LET m51=1
LET m52=1
LET m53=1
LET m54=1
LET m55=1
LET m56=1
LET m57=1
LET m58=1
LET m59=1
LET m60=1
LET m61=1
LET m62=1
LET m63=1
LET m64=1
LET m65=1
LET m66=1
LET m67=1
LET m68=1
LET m69=1
LET m70=1
LET m71=1
LET m72=1
LET m73=1
LET m74=1
LET m75=1
LET m76=1
LET m77=1
LET m78=1
LET m79=1
LET m80=1
FOR iz=1 TO k9
LET z=MOD(iz,40)
SELECT CASE z
CASE 1
LET m1=m1*Pz(iz)
CASE 2
LET m2=m2*Pz(iz)
CASE 3
LET m3=m3*Pz(iz)
CASE 4
LET m4=m4*Pz(iz)
CASE 5
LET m5=m5*Pz(iz)
CASE 6
LET m6=m6*Pz(iz)
CASE 7
LET m7=m7*Pz(iz)
CASE 8
LET m8=m8*Pz(iz)
CASE 9
LET m9=m9*Pz(iz)
CASE 10
LET m10=m10*Pz(iz)
CASE 11
LET m11=m11*Pz(iz)
CASE 12
LET m12=m12*Pz(iz)
CASE 13
LET m13=m13*Pz(iz)
CASE 14
LET m14=m14*Pz(iz)
CASE 15
LET m15=m15*Pz(iz)
CASE 16
LET m16=m16*Pz(iz)
CASE 17
LET m17=m17*Pz(iz)
CASE 18
LET m18=m18*Pz(iz)
CASE 19
LET m19=m19*Pz(iz)
CASE 20
LET m20=m20*Pz(iz)
CASE 21
LET m21=m21*Pz(iz)
CASE 22
LET m22=m22*Pz(iz)
CASE 23
LET m23=m23*Pz(iz)
CASE 24
LET m24=m24*Pz(iz)
CASE 25
LET m25=m25*Pz(iz)
CASE 26
LET m26=m26*Pz(iz)
CASE 27
LET m27=m27*Pz(iz)
CASE 28
LET m28=m28*Pz(iz)
CASE 29
LET m29=m29*Pz(iz)
CASE 30
LET m30=m30*Pz(iz)
CASE 31
LET m31=m31*Pz(iz)
CASE 32
LET m32=m32*Pz(iz)
CASE 33
LET m33=m33*Pz(iz)
CASE 34
LET m34=m34*Pz(iz)
CASE 35
LET m35=m35*Pz(iz)
CASE 36
LET m36=m36*Pz(iz)
CASE 37
LET m37=m37*Pz(iz)
CASE 38
LET m38=m38*Pz(iz)
CASE 39
LET m39=m39*Pz(iz)
CASE 40
LET m40=m40*Pz(iz)
CASE 41
LET m41=m41*Pz(iz)
CASE 42
LET m42=m42*Pz(iz)
CASE 43
LET m43=m43*Pz(iz)
CASE 44
LET m44=m44*Pz(iz)
CASE 45
LET m45=m45*Pz(iz)
CASE 46
LET m46=m46*Pz(iz)
CASE 47
LET m47=m47*Pz(iz)
CASE 48
LET m48=m48*Pz(iz)
CASE 49
LET m49=m49*Pz(iz)
CASE 50
LET m50=m50*Pz(iz)
CASE 51
LET m51=m51*Pz(iz)
CASE 52
LET m52=m52*Pz(iz)
CASE 53
LET m53=m53*Pz(iz)
CASE 54
LET m54=m54*Pz(iz)
CASE 55
LET m55=m55*Pz(iz)
CASE 56
LET m56=m56*Pz(iz)
CASE 57
LET m57=m57*Pz(iz)
CASE 58
LET m58=m58*Pz(iz)
CASE 59
LET m59=m59*Pz(iz)
CASE 60
LET m60=m60*Pz(iz)
CASE 61
LET m61=m61*Pz(iz)
CASE 62
LET m62=m62*Pz(iz)
CASE 63
LET m63=m63*Pz(iz)
CASE 64
LET m64=m64*Pz(iz)
CASE 65
LET m65=m65*Pz(iz)
CASE 66
LET m66=m66*Pz(iz)
CASE 67
LET m67=m67*Pz(iz)
CASE 68
LET m68=m68*Pz(iz)
CASE 69
LET m69=m69*Pz(iz)
CASE 70
LET m70=m70*Pz(iz)
CASE 71
LET m71=m71*Pz(iz)
CASE 72
LET m72=m72*Pz(iz)
CASE 73
LET m73=m73*Pz(iz)
CASE 74
LET m74=m74*Pz(iz)
CASE 75
LET m75=m75*Pz(iz)
CASE 76
LET m76=m76*Pz(iz)
CASE 77
LET m77=m77*Pz(iz)
CASE 78
LET m78=m78*Pz(iz)
CASE 79
LET m79=m79*Pz(iz)
CASE 0
LET m80=m80*Pz(iz)
END SELECT
NEXT iz
LET C=3
FOR i=Q TO Q+100 STEP 1
PRINT "【";STR$(i)&"】";
LET N=(2*10^i+1)/3
IF n=NUMER(n/m1) AND n=NUMER(n/m2) AND n=NUMER(n/m3) AND n=NUMER(n/m4) AND n=NUMER(n/m5) AND n=NUMER(n/m6) AND n=NUMER(n/m7) AND n=NUMER(n/m8) AND n=NUMER(n/m9) AND n=NUMER(n/m10) AND n=NUMER(n/m11) AND n=NUMER(n/m12) AND n=NUMER(n/m13) AND n=NUMER(n/m14) AND n=NUMER(n/m15) AND n=NUMER(n/m16) AND n=NUMER(n/m17) AND n=NUMER(n/m18) AND n=NUMER(n/m19) AND n=NUMER(n/m20) AND n=NUMER(n/m21) AND n=NUMER(n/m22) AND n=NUMER(n/m23) AND n=NUMER(n/m24) AND n=NUMER(n/m25) AND n=NUMER(n/m26) AND n=NUMER(n/m27) AND n=NUMER(n/m28) AND n=NUMER(n/m29) AND n=NUMER(n/m30) AND n=NUMER(n/m31) AND n=NUMER(n/m32) AND n=NUMER(n/m33) AND n=NUMER(n/m34) AND n=NUMER(n/m35) AND n=NUMER(n/m36) AND n=NUMER(n/m37) AND n=NUMER(n/m38) AND n=NUMER(n/m39) AND n=NUMER(n/m40) AND n=NUMER(n/m41) AND n=NUMER(n/m42) AND n=NUMER(n/m43) AND n=NUMER(n/m44) AND n=NUMER(n/m45) AND n=NUMER(n/m46) AND n=NUMER(n/m47) AND n=NUMER(n/m48) AND n=NUMER(n/m49) AND n=NUMER(n/m50) AND n=NUMER(n/m51) AND n=NUMER(n/m52) AND n=NUMER(n/m53) AND n=NUMER(n/m54) AND n=NUMER(n/m55) AND n=NUMER(n/m56) AND n=NUMER(n/m57) AND n=NUMER(n/m58) AND n=NUMER(n/m59) AND n=NUMER(n/m60) AND n=NUMER(n/m61) AND n=NUMER(n/m62) AND n=NUMER(n/m63) AND n=NUMER(n/m64) AND n=NUMER(n/m65) AND n=NUMER(n/m66) AND n=NUMER(n/m67) AND n=NUMER(n/m68) AND n=NUMER(n/m69) AND n=NUMER(n/m70) AND n=NUMER(n/m71) AND n=NUMER(n/m72) AND n=NUMER(n/m73) AND n=NUMER(n/m74) AND n=NUMER(n/m75) AND n=NUMER(n/m76) AND n=NUMER(n/m77) AND n=NUMER(n/m78) AND n=NUMER(n/m79) AND n=NUMER(n/m80) THEN
LET A$=STR$(n)
IF ISPRIME(A$,100)<>0 THEN
PRINT A$;
LET C=C+1
PRINT ":";c;"個"
GOTO 100
ELSE
LET Cx=Cx+1
PRINT "Miller-Rabin法";":";Cx;"回"
GOTO 100
END IF
ELSE
LET Cy=Cy+1
PRINT "合成数";":";Cy;"回"
GOTO 100
END IF
PRINT
100 NEXT i
LET TM=TIME-t0
PRINT USING"####." & REPEAT$("#",2):TM;
PRINT "秒"
END
EXTERNAL FUNCTION ISPRIME(N$,NUM)
OPTION ARITHMETIC RATIONAL
ASSIGN "miller.dll","isprime"
END FUNCTION
-------------------------------------------------
!素因数分解(666667素数)http://stdkmd.com/nrr/6/66667.htm#N34
OPTION ARITHMETIC RATIONAL !有理数モード
LET t0=TIME
FOR i=1 TO 17
PRINT STR$(i)&"=";
LET n=(2*10^i+1)/3
LET A$=STR$(n)
IF ISPRIME(A$,100)<>0 THEN
PRINT A$
ELSE
DO WHILE MOD(n,2)=0
PRINT STR$(2)&"*";
LET n=n/2
LOOP
LET f=3
LET s=INT(SQR(n))
DO UNTIL f>s
DO WHILE MOD(n,f)=0
PRINT STR$(f)&"*";
LET n=n/f
LET A$=STR$(n)
IF ISPRIME(A$,100)<>0 THEN
PRINT A$
GOTO 100
END IF
LET s=INT(SQR(n))
LOOP
LET f=f+2
LOOP
IF n>1 THEN PRINT STR$(n)
END IF
100 NEXT i
LET TM=TIME-t0
PRINT USING"####." & REPEAT$("#",2):TM;
PRINT "秒"
END
EXTERNAL FUNCTION ISPRIME(N$,NUM)
OPTION ARITHMETIC RATIONAL
ASSIGN "miller.dll","isprime"
END FUNCTION
OPTION ARITHMETIC RATIONAL
LET L=1000000
DIM S(L)
FOR I=2 TO L !'エラトステネスの篩
IF S(I)=0 THEN
FOR J=I*I TO L STEP I
LET S(J)=1
NEXT J
END IF
NEXT I
FOR K=100 TO 120
LET N=2^K-1
PRINT "2 ^";K;"- 1"
PRINT N;"-->";
IF ISPRIME(N)=0 THEN !'ミラー・ラビン法など。合成数なら試し割り
LET NN=N
FOR I=2 TO L
IF S(I)=0 THEN
DO WHILE MOD(N,I)=0
LET N=N/I
PRINT I;
LOOP
END IF
NEXT I
IF NN<>N AND N>1 THEN PRINT N ELSE PRINT
CALL FACTOR(N)
ELSE
PRINT " 素数"
END IF
PRINT
NEXT K
END
EXTERNAL SUB FACTOR(N)
OPTION ARITHMETIC RATIONAL
IF N>1 AND ISPRIME(N)=0 THEN !'ミラー・ラビン法などで確認。合成数なら
PRINT N;"-->";
LET D=POLLARDRHO(N)
PRINT D;N/D
CALL FACTOR(D) !'再帰呼び出し
CALL FACTOR(N/D)
END IF
END SUB
EXTERNAL FUNCTION POLLARDRHO(X) !'ポラード・ロー素因数分解法(ρ法)
OPTION ARITHMETIC RATIONAL
LET N$=STR$(X)
CALL POLLARD(N$)
FOR I=1 TO LEN(N$) !' POLLARDRHO=VAL(N$) とできない
LET P$=N$(I:I)
IF ORD(P$)>=48 AND ORD(P$)<=57 THEN LET B$=B$ & P$
NEXT I
LET POLLARDRHO=VAL(B$)
END FUNCTION
EXTERNAL SUB POLLARD(X$) !'素数を入れないこと。無限ループのおそれ。
OPTION ARITHMETIC RATIONAL
ASSIGN "pollard.dll","pollard"
END SUB
----------------------------------------------------------------------------
pollard.cpp
#include <boost/multiprecision/cpp_int.hpp>
using namespace boost::multiprecision;
using namespace std;
cpp_int atocpp(char str[])
{
cpp_int result = 0;
int i=0;
while (str[i]>='0' && str[i]<='9'){
result=result*10+(str[i++] - '0');
}
return result;
}
cpp_int mulmod(cpp_int a,cpp_int b,cpp_int m)
{
cpp_int result=0;
a %= m;
while (b>0) {
if (b % 2 == 1) result = (result+a) % m;
a = (a*2) % m;
b = b / 2;
}
return result;
}
cpp_int pollardrho(cpp_int num,unsigned long c){
cpp_int x=1,y,p=1,n=2,i=1;
while (p == 1){
++i;
if (i == n){
y = x;
n *= 2;
}
x = (mulmod(x,x,num) + c) % num;
if (y == x) return pollardrho(num,c+1);
p = gcd(num,abs(x-y));
}
return p;
}
--------------------------------
OPTION ARITHMETIC NATIVE !2進モード
LET t0=TIME
OPEN #1:NAME "prime_10_9xv.txt",RECTYPE INTERNAL
ERASE #1
WRITE #1:2
LET N=10^9 !1からNまでの素数
PUBLIC NUMERIC B_bits !C言語 bit F(B); の意
LET B_bits=52
LET B=INT((N-1)/2) !ビット数
LET M=CEIL(B/B_bits) !ビットを正の整数へ
PRINT B; M !debug
DIM F(M) !素数候補として、奇数 3,5,7,9,11,13,15,… を用意する
MAT F=ZER
LET c=0
IF N>1 THEN LET c=1 !2は素数
FOR i=1 TO B !3以上
CALL B_bit(i,F, rc) !i番目が素数なら
IF rc=0 THEN
LET c=c+1
LET t=2*i+1 !自然数に換算する
!PRINT c; t
WRITE #1:t
!
FOR k=(t+1)*i TO B STEP t !その2乗以上の奇数倍を削除する ※偶数倍は偶数となる
CALL B_bitset(k,F) !F(k)=1
NEXT k
END IF
NEXT i
CLOSE #1
PRINT c !個数
PRINT "計算時間=";TIME-t0;"秒"
END
!ビット配列 32ビットを正の整数へ
EXTERNAL SUB B_bit(n,B(), rc) !n番目のビット値 ※n,B()は整数
OPTION ARITHMETIC NATIVE !2進モード
LET x=B(INT(n/B_bits)+1)
LET d=2^MOD(n,B_bits)
LET rc=MOD(INT(x/d),2)
END SUB
!
EXTERNAL SUB B_bitset(n,B()) !n番目のビットを1にする ※n,B()は非負整数
OPTION ARITHMETIC NATIVE !2進モード
LET t=INT(n/B_bits)+1
LET x=B(t) !n桁
LET d=2^MOD(n,B_bits)
LET B(t)=(INT(x/d/2)*2+1)*d+MOD(x,d) !大きい桁+1+小さい桁
END SUB
------------------------------------
52Btでしょうか? よく分かりません。
LET N=10^10 !1からNまでの素数
BASIC Acc 成功しました。 N=10^11は駄目でした。
2から9999999967 ファイルサイズは5.87GB
4999999999 96153847
455052511
計算時間=-82507.465 秒
ついでに、このエディター凄いと思いました。
しばっちさんのエラトステネスの篩も
-----------------------------------
!エラトステネスの篩
OPTION ARITHMETIC NATIVE
!OPTION ARITHMETIC DECIMAL_HIGH !1000桁モード
OPTION BASE 0
LET t0=TIME
LET z=52
LET CC=1
OPEN #1:NAME "E:\prime\prime_1E4_xv.txt",RECTYPE INTERNAL
ERASE #1
WRITE #1:2
LET N=2+1 !'3以上の奇数のみ
LET M=1.E4-1 !'3以上の奇数のみ
DIM X(INT(1/2*(M-N)/z)+1)
FOR I=3 TO SQR(M) STEP 2
IF MOD(N,I)=0 THEN
LET P=N
ELSE
LET P=INT(N/I+1)*I !'N以上の最小のIの倍数
END IF
LET NN=(N-1)/2
IF N<=I THEN
LET PP=(P-1)/2
LET L=INT((PP-NN)/z)
LET K=MOD((PP-NN),z)
IF BITAND(X(L),2^K)=0 THEN LET P=P+I
END IF
FOR J=P TO M STEP I
IF MOD(J,2)=1 THEN !'奇数のみ
LET JJ=(J-1)/2
LET L=INT((JJ-NN)/z)
LET K=MOD((JJ-NN),z)
LET X(L)=BITOR(X(L),2^K) !'印をつける
END IF
NEXT J
NEXT I
FOR J=N TO M STEP 2
LET JJ=(J-1)/2
LET L=INT((JJ-NN)/z)
LET K=MOD((JJ-NN),z)
IF BITAND(X(L),2^K)=0 THEN
LET C=C+1
!PRINT j;":";c+cc;":";c
WRITE #1:j
END IF
NEXT J
CLOSE #1
PRINT j;":";c+cc;":";c
PRINT c;"個"
PRINT TIME-t0;"秒で計算しました"
END
---------------------------------------
計算結果は合っているでしょうか?
LET J=1
OPEN #1:NAME "SAMPLE_"&STR$(J)&".txt"
FOR I=1 TO 10000
IF I>=1000*J THEN
CLOSE #1
LET J=J+1
OPEN #1:NAME "SAMPLE_"&STR$(J)&".txt"
END IF
WRITE #1:I
NEXT I
CLOSE #1
END
PUBLIC NUMERIC N,N1
!'RESTORE 1
RESTORE 2
!'RESTORE 3
READ N1
LET N=N1*N1
DIM M(0 TO N-1,0 TO N-1)
MAT READ M
CALL BACKTRACK(M,0)
1 DATA 3
DATA 4,1,0,0,0,8,0,7,0
DATA 0,0,2,0,0,9,1,0,5
DATA 7,8,9,0,0,0,3,6,4
DATA 0,0,0,0,4,1,7,0,0
DATA 1,0,8,0,5,6,0,2,9
DATA 0,7,0,9,8,0,6,0,0
DATA 2,0,7,0,0,4,8,0,3
DATA 0,4,3,0,9,0,2,1,0
DATA 6,0,0,0,2,0,5,0,7
EXTERNAL SUB BACKTRACK(M(,),P)
IF P<N*N THEN
LET ROW=INT(P/N)
LET COL=MOD(P,N)
IF M(ROW,COL)<>0 THEN
CALL BACKTRACK(M,P+1)
ELSE
FOR K=1 TO N
IF CHECKRULE(M,ROW,COL,K)=1 THEN
LET M(ROW,COL)=K
CALL BACKTRACK(M,P+1)
LET M(ROW,COL)=0
END IF
NEXT K
END IF
ELSE
FOR I=0 TO N-1
FOR J=0 TO N-1
PRINT USING "###":M(I,J);
IF MOD(J+1,N1)=0 THEN PRINT "|";
NEXT J
PRINT
IF MOD(I+1,N1)=0 THEN PRINT REPEAT$("-",3*N+N1)
NEXT I
PRINT
END IF
END SUB
EXTERNAL FUNCTION CHECKRULE(M(,),ROW,COL,K)
LET CHECKRULE=0
FOR Y=0 TO N-1
IF M(Y,COL)=K THEN EXIT FUNCTION
NEXT Y
FOR X=0 TO N-1
IF M(ROW,X)=K THEN EXIT FUNCTION
NEXT X
LET BX=INT(COL/N1)*N1
LET BY=INT(ROW/N1)*N1
FOR X=0 TO N1-1
FOR Y=0 TO N1-1
IF M(BY+Y,BX+X)=K THEN EXIT FUNCTION
NEXT Y
NEXT X
LET CHECKRULE=1
END FUNCTION
!'変形数独
PUBLIC NUMERIC N,AREA(0 TO 24,0 TO 24),IX(25,25),IY(25,25),RR(0 TO 15),GG(0 TO 15),BB(0 TO 15)
FOR I=0 TO 15
READ GG(I),RR(I),BB(I)
NEXT I
DATA 255 , 255 , 255
DATA 0 , 0 , 0
DATA 0 , 0 , 255
DATA 0 , 255 , 0
DATA 255 , 0 , 0
DATA 0 , 255 , 255
DATA 255 , 255 , 0
DATA 255 , 0 , 255
DATA 128 , 128 , 128
DATA 0 , 0 , 128
DATA 0 , 128 , 0
DATA 0 , 128 , 128
DATA 128 , 0 , 0
DATA 128 , 128 , 0
DATA 128 , 0 , 128
DATA 191 , 191 , 191
!'RESTORE 1
RESTORE 2
!'RESTORE 3
!'RESTORE 4
READ N
DIM M(0 TO N-1,0 TO N-1),P(N)
FOR I=0 TO N-1
FOR J=0 TO N-1
READ AREA(I,J)
NEXT J
NEXT I
MAT READ M
1 DATA 9
!'ブロックデータ(各々のマスは9マスずつ)
DATA 1,1,1,2,2,2,3,3,3
DATA 1,1,1,2,2,2,3,3,3
DATA 1,1,1,2,2,2,3,3,3
DATA 4,4,4,5,5,5,6,6,6
DATA 4,4,4,5,5,5,6,6,6
DATA 4,4,4,5,5,5,6,6,6
DATA 7,7,7,8,8,8,9,9,9
DATA 7,7,7,8,8,8,9,9,9
DATA 7,7,7,8,8,8,9,9,9
!'初期データ
DATA 0,0,4,0,0,0,0,5,0
DATA 0,0,8,0,0,0,2,0,9
DATA 0,0,3,0,0,4,0,0,0
DATA 0,0,0,0,2,0,3,8,7
DATA 0,0,0,5,0,7,0,0,0
DATA 7,4,6,0,3,0,0,0,0
DATA 0,0,0,2,0,0,4,0,0
DATA 3,0,7,0,0,0,9,0,0
DATA 0,9,0,0,0,0,5,0,0
!'http://suudoku.blog26.fc2.com/blog-category-6.html
2 DATA 9
!'ブロックデータ(各々のマスは9マスずつ)
DATA 1,1,2,2,2,2,2,3,3
DATA 1,1,2,2,2,3,3,3,3
DATA 1,1,2,4,4,4,3,3,3
DATA 1,1,1,4,5,5,5,5,5
DATA 6,6,6,4,4,4,5,5,7
DATA 6,6,8,4,9,9,5,5,7
DATA 6,6,8,4,9,9,7,7,7
DATA 6,8,8,8,9,9,7,7,7
DATA 6,8,8,8,8,9,9,9,7
!'初期データ
DATA 6,0,8,7,5,0,1,3,9
DATA 3,0,0,9,0,7,8,0,0
DATA 2,9,3,0,0,0,4,1,6
DATA 0,0,0,0,1,0,3,0,2
DATA 1,0,2,0,0,0,5,0,0
DATA 5,0,0,0,2,0,0,0,4
DATA 7,3,5,0,8,0,9,0,1
DATA 0,0,0,3,0,0,0,0,0
DATA 9,2,1,0,4,5,0,7,3
!'http://suudoku.blog26.fc2.com/blog-entry-507.html
3 DATA 6
!'ブロックデータ(各々のマスは6マスずつ)
DATA 1,1,1,2,2,2
DATA 1,1,1,2,2,2
DATA 3,3,3,4,4,4
DATA 3,3,3,4,4,4
DATA 5,5,5,6,6,6
DATA 5,5,5,6,6,6
!'初期データ
DATA 0,0,0,5,6,0
DATA 4,5,0,0,2,0
DATA 2,0,0,0,0,0
DATA 0,0,0,0,0,5
DATA 0,2,0,0,3,6
DATA 0,1,3,0,0,0
4 DATA 12
!'http://12x12sudoku.com/
!'ブロックデータ(各々のマスは12マスずつ)
DATA 1,1,1,1,2,2,2,2,3,3,3,3
DATA 1,1,1,1,2,2,2,2,3,3,3,3
DATA 1,1,1,1,2,2,2,2,3,3,3,3
DATA 4,4,4,4,5,5,5,5,6,6,6,6
DATA 4,4,4,4,5,5,5,5,6,6,6,6
DATA 4,4,4,4,5,5,5,5,6,6,6,6
DATA 7,7,7,7,8,8,8,8,9,9,9,9
DATA 7,7,7,7,8,8,8,8,9,9,9,9
DATA 7,7,7,7,8,8,8,8,9,9,9,9
DATA 10,10,10,10,11,11,11,11,12,12,12,12
DATA 10,10,10,10,11,11,11,11,12,12,12,12
DATA 10,10,10,10,11,11,11,11,12,12,12,12
!'初期データ
DATA 0, 5, 0, 0, 0, 8, 9, 0, 0, 7,10, 0
DATA 7,10, 0, 0, 0, 5, 6, 0, 0, 0, 9, 1
DATA 8, 0, 0, 0, 0, 0, 2, 0, 5, 0, 0, 0
DATA 0, 0,10, 0,11, 2, 0, 5, 0, 0, 0, 0
DATA 0, 0, 0, 5, 0, 0, 1, 0,10, 0, 0, 0
DATA 11, 2, 8, 0,10, 0, 0, 0, 6, 0, 7,12
DATA 9, 8, 0, 3, 0, 0, 0, 2, 0, 4, 6, 5
DATA 0, 0, 0,11, 0, 7, 0, 0, 1, 0, 0, 0
DATA 0, 0, 0, 0, 8, 0, 4,11, 0,12, 0, 0
DATA 0, 0, 0, 8, 0, 1, 0, 0, 0, 0, 0, 4
DATA 5, 6, 0, 0, 0, 4,11, 0, 0, 0, 1, 2
DATA 0, 4, 3, 0, 0,10, 7, 0, 0, 0, 5, 0
FOR J=0 TO N-1
FOR I=0 TO N-1
LET S=AREA(J,I)
LET P(S)=P(S)+1
IF P(S)>N THEN
PRINT "マスの数が異なります!!"
STOP
END IF
LET IX(S,P(S))=I
LET IY(S,P(S))=J
NEXT I
NEXT J
CALL BACKTRACK(M,0)
END
EXTERNAL SUB BACKTRACK(M(,),P)
IF P<N*N THEN
LET ROW=INT(P/N)
LET COL=MOD(P,N)
IF M(ROW,COL)<>0 THEN
CALL BACKTRACK(M,P+1)
ELSE
FOR K=1 TO N
IF CHECKRULE(M,ROW,COL,K)=1 THEN
LET M(ROW,COL)=K
CALL BACKTRACK(M,P+1)
LET M(ROW,COL)=0
END IF
NEXT K
END IF
ELSE
FOR I=0 TO N-1
FOR J=0 TO N-1
LET C=AREA(I,J)
CALL SETCOLOR(RR(C),GG(C),BB(C))
PRINT USING "###":M(I,J);
NEXT J
PRINT
NEXT I
PRINT
END IF
END SUB
EXTERNAL FUNCTION CHECKRULE(M(,),ROW,COL,K)
LET CHECKRULE=0
FOR Y=0 TO N-1 !列
IF M(Y,COL)=K THEN EXIT FUNCTION
NEXT Y
FOR X=0 TO N-1 !行
IF M(ROW,X)=K THEN EXIT FUNCTION
NEXT X
LET C=AREA(ROW,COL)
FOR I=1 TO N
IF M(IY(C,I),IX(C,I))=K THEN EXIT FUNCTION
NEXT I
LET CHECKRULE=1
END FUNCTION
EXTERNAL SUB SetColor(R,G,B)
OPTION CHARACTER Byte
LET EM_SETCHARFORMAT=BVAL("0444",16)
LET CHARFORMAT$=CHR$(60) & REPEAT$(CHR$(0),59)
LET CHARFORMAT$(8:8)=CHR$(64)
LET CHARFORMAT$(21:24)=CHR$(R) & CHR$(G) & CHR$(B) & CHR$(0)
CALL SendMessage(WinHandle("RICHEDIT"),EM_SETCHARFORMAT,1, CHARFORMAT$)
END SUB
EXTERNAL SUB SendMessage(hwnd,msg,wparam,lparam$)
ASSIGN "USER32.DLL","SendMessageA"
END SUB
動作報告です。
-----------------------------------------------
!エラトステネスの篩
!OPTION ARITHMETIC NATIVE
OPTION ARITHMETIC DECIMAL_HIGH !1000桁モード
OPTION BASE 0
LET t0=TIME
LET z=52
LET CC=0
OPEN #1:NAME "C:\prime\prime_1E20_xv.txt",RECTYPE INTERNAL
ERASE #1
!WRITE #1:2
LET N=1E20-1E6+1 !'3以上の奇数のみ
LET M=1E20-1 !'3以上の奇数のみ
DIM X(INT(1/2*(M-N)/z)+1)
FOR I=3 TO SQR(M) STEP 2
IF MOD(N,I)=0 THEN
LET P=N
ELSE
LET P=INT(N/I+1)*I !'N以上の最小のIの倍数
END IF
LET NN=(N-1)/2
IF N<=I THEN
LET PP=(P-1)/2
LET L=INT((PP-NN)/z)
LET K=MOD((PP-NN),z)
IF BITAND(X(L),2^K)=0 THEN LET P=P+I
END IF
FOR J=P TO M STEP I
IF MOD(J,2)=1 THEN !'奇数のみ
LET JJ=(J-1)/2
LET L=INT((JJ-NN)/z)
LET K=MOD((JJ-NN),z)
LET X(L)=BITOR(X(L),2^K) !'印をつける
END IF
NEXT J
NEXT I
FOR J=N TO M STEP 2
LET JJ=(J-1)/2
LET L=INT((JJ-NN)/z)
LET K=MOD((JJ-NN),z)
IF BITAND(X(L),2^K)=0 THEN
LET C=C+1
!PRINT j;":";c+cc;":";c
WRITE #1:j
END IF
NEXT J
CLOSE #1
!PRINT j;":";c+cc;":";c
PRINT c;"個"
PRINT TIME-t0;"秒で計算しました"
END
---------------------------------------------
OPTION ARITHMETIC NATIVE
OPTION CHARACTER BYTE
OPTION BASE 0
!'LET N=2^20
LET N=1000000 !'2のペキ乗(2^n)でなくてもいい。
!'DIM RR(N),II(N)
LET T=TIME
LET RE$=REPEAT$(CHR$(0),N*8)
LET IM$=REPEAT$(CHR$(0),N*8)
FOR I=0 TO N-1
!' LET RR(I)=I
!' LET II(I)=0
!' LET RE$(8*I+1:8*I+8)=PACKDBL$(RR(I)) !'実部
!' LET IM$(8*I+1:8*I+8)=PACKDBL$(II(I)) !'虚部
LET RE$(8*I+1:8*I+8)=PACKDBL$(I)
NEXT I
PRINT TIME-T;"秒"
LET T=TIME
CALL FFTW(N,RE$,IM$,0) !'変換
PRINT TIME-T;"秒"
LET T=TIME
CALL FFTW(N,RE$,IM$,-1) !'逆変換
PRINT TIME-T;"秒"
!'FOR I=0 TO N-1
!' LET RR(I)=INT(UNPACKDBL(RE$(8*I+1:8*I+8))/N+.5)
!' LET II(I)=INT(UNPACKDBL(IM$(8*I+1:8*I+8))/N+.5)
!' PRINT RR(I);II(I)
!'NEXT I
END
EXTERNAL SUB FFTW(N,RE$,IM$,SW)
OPTION ARITHMETIC NATIVE
ASSIGN "fftw.dll","fftwsub"
END SUB
--------------------------------------------------------------------------------------
fftw.cpp
#include <cstdlib>
#include <fftw3.h>
using namespace std;
OPTION CHARACTER BYTE
OPEN #1:NAME "fftw.dll"
DO
READ IF MISSING THEN EXIT DO: X$
FOR I=1 TO LEN(X$) STEP 2
PRINT #1:CHR$(BVAL(X$(I:I+1),16));
NEXT I
LOOP
DATA "4D5A90000300000004000000FFFF0000B800000000000000400000000000000000000000000000000000000000000000000000000000000000000000100100000E1FBA0E00B4"
DATA "09CD21B8014CCD21546869732070726F6772616D2063616E6E6F742062652072756E20696E20444F53206D6F64652E0D0D0A24000000000000006C9B268528FA48D628FA48D6"
DATA "28FA48D69C66B9D620FA48D69C66BBD647FA48D69C66BAD630FA48D69C66A7D62CFA48D646A14BD739FA48D646A14DD73EFA48D646A14CD727FA48D63367D4D62BFA48D628FA"
DATA "49D67CFA48D6FAA14DD729FA48D6FAA148D729FA48D6FAA14AD729FA48D65269636828FA48D6000000000000000000000000000000000000000000000000504500004C010300"
DATA "66E875570000000000000000E00002210B010E00008000000010000000E00000B06A010000F00000007001000000001000100000000200000600000000000000060000000000"
DATA "0000008001000010000000000000020040010000100000100000000010000010000000000000100000000C71010044000000007001000C010000000000000000000000000000"
DATA "000000000000000000000000507101001000000000000000000000000000000000000000000000000000000000000000000000007C6C01005C00000000000000000000000000"
DATA "000000000000000000000000000000000000000000000000000000000000555058300000000000E00000001000000000000000040000000000000000000000000000800000E0"
DATA "55505831000000000080000000F00000007E000000040000000000000000000000000000400000E0555058320000000000100000007001000002000000820000000000000000"
DATA "000000000000400000C0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
DATA "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
DATA "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
DATA "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
DATA "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
DATA "00000000000000332E393100555058210D090208A134AA23AB86A6FD3A4D0100AD7A000000100100260A00A46CFFFFFF558BEC8B4D0C56578B7D0885C975038D4F208B451089"
DATA "47300514FFFFFFBF348D47185057680000012351E80A0017378BF083C41085F6740D7E1E0FEE6FFFF6B7F681CE190780EB138B4F040D0150516A0257256DBBFBDD0059235F8B"
DATA "C65E5DC35CFF75144A0805BF7DCBB710020CFF701C184877221485C07E08B63DF66E36C00D432A568B75287622D9B6FDC876BA83661800031C4E59492FFFEDB7460C33D256BE"
DATA "8CA17085C074108BD08D4A017FFBB7FF8A024284C075F92BD1C5088D420183610434610C00893189DDDF2DD9410837DE33FF38748BD73A16BB7DFB2702668B0283C2053BC775"
DATA "F53ED1FA4061B75BFB045502263C7904020C5F430D7F433728386A298B5510538B5D1C2F200AFF7FFB83E900742A0401752884D274060FB6CA41EB05B92A2FDD42EB3F08283D"
DATA "4805180C8958C3CDFD0B4F7814EB0683200010E4703040F8F085060834112457535120CE52B3FFBB761DFDF70D9EFFD65E5F5B5DC22400BB7CDBDA850B8E742D754C4A02420C"
DATA "234D9BB7DDAD100BC8C4421012142345103B63B76F6F0B75053B0D740432C0AFB001B3837BD8DAEDEC10A08BEB333BB4CA5B81AF6D7BEB7E00EA8081C9E10BFA8945F4420405"
DATA "6DBB1596F80806A54DF09D1C0EE7B676F8FC8B460451458EBC010C9F0D1B0A06BDA856140010C7F63737C2410C2351134441188D45F05013BE7009E61C01BCF4DF1C5E8BE561"
DATA "FB82DB87CC852F5C241855813581F65B7BA10438FBC1E705E4578944242006767F6BED8B7C052CDAE885FF0F84325985EDF8FFADD9072A831830006A4075046AFFEB026A0155"
DATA "E7F8CD5D2AFF1540CB74243C33C93F3F0A6EE337034C241083FB7D8CE95DFEC2DFD80C2CB0108D7BFC83C1CA5618C1EF022B75DDDFDE2C2C4789041C8BDE8D34BD23000C1071"
DATA "FBFFDE42280F1F840E00F20F1042E88D4920071140BB7BBEBB1452200F41D88D4040B80C440BE00AF37D63EFC01709C831D813D0CFF33CCFE8D8E0E0F0E8C175DDC683EF19A1"
DATA "FA24E2189BA5FBFFDF7ECB7D3F8B54908BC1C1E00403C78BFE2BFA8D0CCA8BD32B136B96037610668F040F0800866C979F6F104EF8F883EAE2FFB914192BDD2206F5C4040DFA"
DATA "A1F7C26BE67CF1DC8F10297CE342C3BB5D5C0A4F0818248D7FFC0A470093839D5C1C80FF40F07CEFE4C942E840F841D6F911FB9EAF3B040AC814E0D02ED813E7799EE7D8E8E0"
DATA "E0E836F7DBB2F0FFDF1C3BD37D338BFBC2D96BCB6F2BF703C52BDAD7837FE790EDBDF7110431F67E3EEFEB1B3FDC36C844B64100503455AEA5526B02FFA09B5B6A7AD21D8DC3"
DATA "1C72205ACC2F83E8FDE7795B953304017420110533C040EB30F4D257DA2408DAA106BBACC0EB1FDE167EB27310051A59EB507D880F95C0BA55BAEB195012062C5982466A105D"
DATA "77FFE8FCEED20DAC6A0006094A596E07F8FFD76D50E923194B608845E3B301885DE78365FCDEBD5DDAB43DFF079480076A071B0C25C7057DB7EFF40F1B2AAD3A74654B4872FB"
DATA "B7D9550D770B2704DEC70424100BEEF876471E0C02A13426A124DCCCBEE6DB160485762944952018203667E5F91D1C70680232DBFDAF5DEA8BC7C7FEFF00C82284DB0F854C74"
DATA "B7069E0C0C1FC03E9E1E56F50A8602AEAE4A1379B707E11BACD68B36867FFF4C9034F0DBDA9F0FF2C38A4F1FE331A759B637F2B06C0C1138A126977F41782F34894D4F48A30D"
DATA "113F24B984E40C023E1A83255018B00821A09A580BADD49E860AC4C7D99385C1C8F6CD4A227A323D7CE4A1C08B4C586184EE0B6C6D61FFDF0A04650595085B765DC3EB31D357"
DATA "0853EC07B2893ABD72AB406C4FBE0019056726F91604C7A73FCE5FE4617F17112859220BD81A2B4937E96E27751E1750445666E07BB309652604D2036BADC5B6130B49C70A8F"
DATA "176FD8297B037548757435129F6E838DA5EB1C4DB4010430D8DF980CDC04CB1A080850C418C38B8920B81B2F33F6382F553D456242172D0D6083821BC39FDE123BC0460A0F1E"
DATA "0BC108254C0FECDBA105BF3C6006A94389FF0DC122C9001883E01F6A20592BC8AFB7C1E0BDD3C8330512FC086C483CFFDDBFC003C8F041148D511803D008066BF02803F23BD6"
DATA "741DBC818919147A0C720A470368B70BB7420AC87293C2281875EA9674EC2E993CF0EBF96C0FA8BF03C384E11B9DC364A11875C60506ADC47F988B5004EB043BD0CB29A19AD9"
DATA "A0FBF00FB10E23F0C15E03239B1AC1343DB70E0724A68D93B6AA18C386832659AD3BED667F251454845A0B29F89D1473B19DFB5FEBED2C092A030E0CCA7188709889181333D1"
DATA "C12434A9503255EA1C47B265B38C1821115D84771BE5777301079C2837591420543FF311BA9F95168F2A1D59E9658E6D7DB14FDB080082C642B401BB7F2658F345C2979CA4E6"
DATA "0A37894962EB146A79E9AF0CA5C3B60DC7223AFE9C7C7B846BB2862AE2267F54082C7FE4FBE6EB5712A8F7D8591AC0FE4408AFE123C68D75F457CABF31CF4C9818F283C8FFF4"
DATA "F16EF6B526E5A50020A810323A125D731387155FB66A057B92A747B1CC6A087078B84D5A0F7777DB7866390589F0E460A1063C81B80CE3E6FBED504517754FB90B011E881875"
DATA "4137B3ABD1AFB91B2BC11AC4081C05E35DB7CEF740DB00807521D3A58D56A0768A2A6500FBF1304BDB8138A500FF94F91E429283F432C0130F80133E361E650937B947874058"
DATA "B6ADAF806FB4DD061C0C12131A664FD52A0B07695968C186C319EC8B112183E1C2C7B8C307EF83F8FF382821EB0B6C62ED1B4E91595A1BC0F7D023CA3A83F06CB0A8EC16D848"
DATA "B8148D62B70B1BF40003F8005A6D54A3E6FABF4EE640BB74BB5C7833D0BE2B85C67409421E84EB668D0BA53E587050D1A067773399C18E9D450E1C31081856A271B224EC149E"
DATA "9C0FBBBDB5D633240205C83BCFA3B94F5BBD50BA81AE85CEC7250D1147FD7654A2255110890D7AF7D133B9268C0714C517DECD65F371ECB84D24C3C6B814964B3FC6BAB80BC0"
DATA "05C8950BF6E3048C7CADD1830811050DFC02F0EDDFCF221078E881EC24034653566A176F6DAAD98710E80534CD29A18D85DC3DCDB76FBDFF68CC026556508935D0BC3EBFB777"
DATA "6189858CFD1A898D880595849D808EBDF97CB57CBD78668C95A4068D98C89123479D748570A56C6E05F3E6AD689C8F859C3BA78594BBB1E6E9088DA0C78101FC8B408BB591ED"
DATA "FC6A501D90A88E8830626B689D8BC70F074006ACDC3FB270927AB428568D58FFF7DB2C631B8E9D0A471ADB97FEC31E30165D270B8DF82C390D2087DF85C2C3F8FC2105E45E5B"
DATA "677FB53506D3D00A539DEE0CBBEE60837F043BF37318893E08098BCFB0F6F6B35DD783C6041672EA5F352A038792671414FF25E743DF146C18CC008F12D064FF35BBCDB695A1"
DATA "135A6C038D2B157E3CB6E052577E3F33C500522BD5283EACDB0B4411BAD40BDAA964A3F363778E8EC356642900595F5FC451FF8DB1485FC9D4CAEC2C5333DB43091DB4AE0977"
DATA "4F106A0AEDF0740E2B7D2F75E6ECA9C0830D1A02B2742AFCFF77891D338D7DD4530FA28BF35B8907897793EFDAB6377989570C7DD468E06281F1696EADB1D0DB65490EDC356E"
DATA "006CAC09D617BAFCD83547656E75F7D9BD581AC96A0FABBB53F6C101594074434225F03F1A3F6F7F7B3DC0066F74233D600602061C3D70153D5037B334DB0603140E03070675"
DATA "11831DFBAF8B05D883CF018908EB06107D8F80EBDAF4074C8CE48603E87C32FBCFDA169858C1758D5DD489038973B9D3C79B654B53D8A9000222ECA656986C05974E022C1708"
DATA "9DB0B5F76D6D000477FBBBE5CED417E274550610744E5659B8447B0F01D03DF355F405F0C1BB5A60F49106B5F80675339C2DF02E662FA13C97083E03D9B6D7D6F66920223B12"
DATA "1720A485983905136F5BCF913E68EE391721F83BEFC1EC60E1F27502B7F27A0FED457C866B46B0A5AF680904D233C60A4E0A40C1445DC75D79405AC56A025969083737770B1F"
DATA "0D05DC8915D8891DD48935DB57FA35D0FD08CC8418F8060D69B6AF34EC20C81405C4766E966625C02DBC9C8FF88D67D9DC45C007E404E882FA452ABC08071365E5083037F6D1"
DATA "7BB3A11C40ECF9E0B73F63A7B109E4A809F06A0458844936DB6BC00F80F4028B0BD439D97D894C05F80FC1E0147D3A7CF0226434C53F49A038B4E0A3083B267D176832C1212A"
DATA "4C93DE056F6FEC5FA466890F3BC6750F164812104477FE48EE04576C3A4C7767EBCD04A5642DD08D8DF46A91EB57B768049F516C10EE69BB26DEE2FB2505765AA620A700BFD5"
DATA "94D97D0F571E0197783FADF0BAB769D4374D78362810D9BEB37D485006E412DB0BB432B673DBD66A422AEA9142D3B0F375F0285F8B11CDDBB49BE40AE48888CDE36D1B23B750"
DATA "00686400DDCC006DED32B30D46844E18D80688CC009D08FE4B2C7D8B062FFE3E8B4E0403CF330C386B886CCF4E46080F0C91E912426C8DECCC3FBD1CA27161E386DCC645FF0B"
DATA "43047310C8020D66FD0BF9F46D3B57A3660250128C6710A07D67F8B61B2A2DFCF64004660FD8BAC16FC71DE48D02897DE88B7BC343FC8107B696CDFEFFC0744D482E13DB7F47"
DATA "028D04478B1C810581262437FEEE4BD374668BD6471ACAB101884DFF36786A3EFC2DDC7E5752D163736DE0753473107C4AB07BB7372B68072887ACC19472A69A7B1AC611BA44"
DATA "BBA40A07B98B9F067CA6361355085B54FAD7DF6E54E039780ED44B8A5C8BFB83FBBAB7066E8C8573D584772FEB21D50076A1356AEBD5AA301E68EBAC7D023C8BCBBA611B1356"
DATA "5AED6027D0DE552CF1C327FE5CACD0D70A24632789580CDFF65CC52A982D8B49951A497DBBDDE1CC051CAE04196E094374EA2B07791BF51C7F3B6063F46A4F791B7DDFAAE91B"
DATA "1BA193D44759821273BE123245E858EC2837221992A10D87348B152B9D502811D4D47F6CA930782A6B8BC65912F14A2C84C190EF580C920B0BBB250808C77C2451C9A53C70F9"
DATA "BB970169C0010083F9200F8EDF0081F9FFE06B5DEC0FD405BAE4D80173092FC5DEC4F3AA41048BFAC3121C010F8351D86EB8B220006EC00370EC3FFB02BF660F110783C7A8E7"
DATA "F02BCF427E4C8DA4BBDB6087246C0690287F070347103CCFF37C0420304050608EDEF1FD708DBF3D81B015EFF7C11897EC616FDAC5EB1377733E73B25BD14E77721CF354F37C"
DATA "652064BFDB761373EC351F4174628D7C39E01F8A3F5BB0BF1B030E88074706677BD68F0D75F21504CFD866DBBAC304170477F87420C1CBB689779B056D47041F08089800B327"
DATA "75ED54F9DD0A2C991F488D1AA70B0C3EE00528C7A40B8B152CCFC1BFA93787CA8BF23E33F0D3CE3BF77469C60D5C30029AEB635B3B7514D8175DB0E1FF36AD16B6B82FCED0D0"
DATA "66B71375EC3B47CF2986FB0C1A88946C8BF03BA4ECD96F8213FF598703EBB926EBD9075DB96AF58BC2C6D0C9D36239DA4BF7FA873B3EC0F17497DF99E6A05733C08D3C9D0AFC"
DATA "9E0FF6436F6ACD8C0B8D4101A523C1EB26D8B3B5EB1C9DC79856EC085373B43581CF707527E466576E8BC92ED7565619EBD7F61DDA855880093887EAEB11D641631DD0078A56"
DATA "2168B1EF6EB6DB5F805400A24C0448096890E818C7161626179F02121CDC74DDEB032BF65CF66A32585E3F605C0904D9B34C583F1A18144295883D47787409CB11F6DC844211"
DATA "37423932213FCF8C888C6A0320009809CE201082610D62CFA8A009124873C308370F345B31023D878D44885839BCB49A6B0F88097739373C502859E7353C0B39C93FDF808D7D"
DATA "6473CC39C4CC6A06CF804C255CE0D836D92362099D390C3CF30CD81060EAF4EC941013F2F46A08148524CCD8ECEB0C0E4554A0C3711A6357D2BF55D763F0FE2041A06A0959F3"
DATA "AB5F69140E5723222726D7676CA5D6B31004BB453682839BC06FD326005381FE4075E00A007815C814AD6F1876F525DA794C7652505151331A60197816411EC48931A20F565B"
DATA "012545308B5808B7C1166F3D33198B701EFE433B43FF4B6D03B3FA08B6F2762E8D34768D5CB36D83166D530BCD620496FD75050A775B3843E31DE1B9433718CC0B0C1E84B064"
DATA "FADCAB463800BDBD56CDFDBAB77841040611B82774336F6CC61689A548B7C8D0E9685D6EC4B2B5740210149519CC0AAFBF6723C68902B8CB0F331189D6FA10A63552B66CB79A"
DATA "1C3E711C0218283411ADB64DC29955FD136E2DDDAA78BC33D2C333CDD15B73A76F87B8128BF18BC15CAE1DA5F66A1EC933D2E64332B5B076C18652221B12A58C2A5C2C73D06D"
DATA "6C6452517F5F2B57102890140B753B8356437A301292597CB80567C15A604A742758E37784CA750E1F18B11F1972DFC7DA59690FEB595956CD2B9BB5B2C4118D60FF4C338A06"
DATA "DB196690AA138BF83B59D80D9C3D901A7861426A28CA98CD7EEE2B901A1B1256305A26DB861D702DE3EB38FEF76DCF161056AC8BC7E3C3F12F316F245CEC3DA39AB5D068D713"
DATA "8FC4B2504AD828EBE5913BC05932DDD57703BA6A1FED44D8B9CB5862C13C6C3B0AA00F5A5735282A0D1A3BA8154F0B70AF34B328C4B7C702FE1872DBF22F9773856B6F89C91F"
DATA "72CFBA0DDA6B236CB80D40B584FFB8E297B10D3AEFEE0175EB5F18DD920656AB39C50B83D109A57406D155931C63160FA7E888D55DF48F2C599A2B3214FC2C3B6E6FE8502852"
DATA "0324528E1D31088D96A794644455FC28B590BEFE64F05B259DA7139840695B28B78D5A3855363AD32C06063BE4E24D9774762D558B0CB389BF263D69FA567CB3571744B3589D"
DATA "E03DCD0854B7B6B1DE63B72458F9648B0F8179048375A305BA7851E95227510835BADD6BB2DAA651BB917002D4018782082BDF43E3C6566FB26B0C551058B6595BB8ADCDB0B0"
DATA "FFD016FF38528174E524FA47AF0F94C05D6C98FA90D968A3CC10B01F70418913BA1F09551FDCF0D4158F6D2CB1591C8012BCDC6D84BB4385997C7BB90EB48701894CBD16808D"
DATA "D020C25691783C8B1DD225E2C0C60F2D32CA7EE6B83BC82BA35BC4EA33D92D5BD3CBC1FE583A54FAE3D393D0EB0A45A0AF89690B0BDC89A469A8EE7453110D4838E4823CDF10"
DATA "504CBC9D2CDA0E929E01791F20EB570CD6162CCA2F82FF306466E70AB31E037FFA2A2F4DF84067E4F9F989952BFEEFE6428A30FA64A130DD4068C1E808A8016120C1A352712A"
DATA "4E8287251888CCA73C4DA0482FAA73563C50ABBF3DF38B413C03C1344EE6F57DE99F481875DB83787476D583B84AB050E0393A54F986DC47B82209EF80AB6FD3603BF8AA7063"
DATA "8C7F235611C48090A988DB6E0DB44D4C88946095837D3B2504383BD62268BF53C7D3EB69F662B818015DCACDCCA6E01E161D110C0F86394414E5FC529690C91B00B902FE81AE"
DATA "7A53302BC683C003FF97B850AB4A0239341BDBF7D323D8741C8B066085AE00ACC70B2FAF2BB9EFE055F8FC473BFB75E4A80CAA80802D6C5BAB5A0DF653FC4CEB175E0E8BCF40"
DATA "D7D768231D940A0C437045EDE942B6445EB80939F5C723D31203330DAD4C1F0860652131C05836438DA7AD0E587E43C216C0DB71AB1441CB82901C3BD07AA136E29259393948"
DATA "C1216AEFA87175F5DAA4078B790895B7B2F1AC4C2293DD050B895980E636D808400F014CF10046B4B42D9CA623890883EC0856E13FB560C4BE42248D506CEB1B5ED9F86F8534"
DATA "54C275F68B5E08B89147C0D94AB87F774F744481398D0B6E078EBF599EE5228F1190756FC7460881344FD701346608865D83F6344FF354824B84424C4F0E32C89293B402B502"
DATA "3CDDD33522288D19088E107801CDD385078A1BED2114DA6ECF2D7F5989AC96E0966824BD04EE95A50A6F296B59E4E75F3FB184188292260BC00048ED769374163E8404418EC7"
DATA "1E7CD8D5058DEB2A8422FDB30E78BCC70F1250B932B4BB89138FC6370E57B5000753300803CB53025FFA7F8B158BF78A07EB183C3D7401421E8D59018AA0FB1FC101415FCB46"
DATA "03F18A060AE49CC4468D65E0507FD83ED9EDDFDB746D895DFCEB52C68D512ECA803F3D89A50DAE83B774372F50AD8931D30330576681F31F146E0D1528FC998930C6AB7D8835"
DATA "E7FC9A0803F84304B05DD56AA97D2C23CEBB976858E359560AE5C35BB37E8710605065391917682B9D51491F3BD6FE61A167D182A58D7F3B071F38401AF6F0564030F19096A8"
DATA "DDB67E0476DA566F482AF1F408592CF78129360ECB413C1C8BE605D8E99D8612CCAF261AC2AE805CC89124419F1179BE2F11FD0E5CC466235F7BCE490ACEC83675064F058018"
DATA "A498C083AEE01994E4005F30860138422C3326E070138097C0ED24F43C4CB6B650128B183410BC48CE0CD650E025C07A29E4902545F80FDA14A6CF814DFF6D6728D781F49944"
DATA "FF3C26AFB2C300B72724AF0C364800A34618A9060D0850C1DF0930351A5B64189E084F9423126C3826D14EE82FB42FBDDEF28B5B66E61F33FAD2A1CE33DA80A6A0C4D3CF6F81"
DATA "BE8D5DD09D1208B51B7DF4D90270E489F0A6CEC283AEA34AB5FEDF7260390374C1C794B661707BF2D3CE3D89034695E8C17DAECD635F5C5A0001FF6D6B5F604042CA894DF840"
DATA "2CD3065DEBA56849433B4DF4ED5A3B54A24BF745F074A00F898BF9309BB481BB52EB8E809F57084E3DACB414A9C299FAD3CA3B763BBB2EE83366015E891005500406C1AB013C"
DATA "085F763B980D8791136615F856550FA1408115281CED2D58980E2D1ECC578B7EABDE0CDBD6D88BAC33ADF014AFCB3BFEBF8B1E2B102BF3B812C1FE023BF0776DA6DA8502FB8D"
DATA "3C4632935FE913D0BA21721D12D44211C970401B92C485152BCCD496E2281C511FC82DF5618A1A8D04EDD91E1A183DDB1AB9957DFCE8711B02D061C57E2BC7FC2F99302B2895"
DATA "1BD2F7D223D08955FCC21BBA441455F47889118D49A8C3D01CB44667EF7C97A27D881F25A1538907628B5D14E57EAF5F4B0989018D47C7110B560F88CF052B150C950E089089"
DATA "245C685B5E40C296C4018887180511DA5E89D2B10250260796F5DA25511A32859ED40DB696C8288A3B0A751FAE193884BE8906F8027391ED2C59935AF8600CC0DD6490F8798B"
DATA "05A8B9267315B9DC1044839D54ABC8660A3E0BDC9D4FE09EDC024B73077D56DB78B43AAC4DDA35129FCF6F1720387A05457B4728498D78B5413C20A1147A2D830509B3A056FF"
DATA "08BF8ED0810E452997AA1048DA901582B10A4CB9123272C9D81C104C201C13DC9821760D206A42BFD0504314F10E8D198BD02BD6837A849685C2EFEAC617DA7429DC5EF8251F"
DATA "C9FFF00FC15416813E370388DBC0295A6573D8C7060F015783D024D72EA8B3816F97E3ABB004384D44AB8608140BB4A34304F3C0CE352924452EFB072BC3372CF44C18EF001D"
DATA "B8FA223755DE6B1E4A2CA3032B52F90E96043889C59C721B82C92B4D22742D538331DA3917F00E107498982728C4A7184A63880703C6C60F5749EA591B5E508374F4FDE9FEE0"
DATA "77C01746EB142D761A2009EB8023B88F596D56558CF2B1BB9C12D9EB0D56C7000C0061A0C54BB4605685D2C5E9593564E08E0AE417C6E4517CFA582D6A165E89383909AA407F"
DATA "EBCB19FA2BF28A043E63DDB4A168F605F7F15FBC0B880AB98F979E2E22EB9EF6EBD33B1174A9FEF1B7DC160A6C59F6DF8002742170005B9401071768CCC5A7708D76373F0B09"
DATA "AD2D2171203EC114E0FA640D7EE958F7F6CE0C72340FAF18F9620B814C08CCF93668AC6DDEC64715F801038BBB864D97FEEB161D105C8712080660E142E573150764AB4456EA"
DATA "5D882F1D8D57A407528D77C14C896DB1BBB03848A2890E184B902A377E097EFD07BD8B0F3D8150275EA802750D18EA6297FA02890D6C017040C68259322EE847365BF02FB62B"
DATA "180D2081FE297881A9384B2E2ED6D80B1E2CC85931C36B1DE08D00EF180545687CDA5E7220BF4A0D20D00D20585C604B47809CB9DDB1EFB064045C096A157A2D44D7D921F68C"
DATA "197C7409D1190F12258BEB2D0D788B210F42A203292DE03CDBB0119B993C285224242AA32233082432B9B2F8231E02189D5B5F5D372014610CFA04182A034140C94A182A42F6"
DATA "58588D7A580A4055FBA0D901285A460455537619140C0C556483661720305A620B90ABEC05555C07F641B3385A7E06550CC8901C6158600830063D175C549A13B365D0845A15"
DATA "9A5B19B290419B610C2C9D7B2B50A64D2728298B5AF42424225830B2645F1B08C8908C3D308C5073A0249B4523172A12CA5E257C462C874EF0591D849C9028650D782B0BB6CA"
DATA "1F005F893782035F24F414E3F9011246B81408EB545840B6C484B040B00858275A42812677DBB50AD7DF5F2E7A750E33C9BA4D41870AC1D1227E976558B90E8701E29C245A09"
DATA "60F00D28E24439900D7487ACACCE279CEF40B2AC80230CCFCFDB17F592287134DECA8831FB6701AB64B8B54F604E3548207DCA2FB60C06EF1AD1C876B2591CF901750F81F907"
DATA "51756007C815F2325C806A851CC06662AB32A76CE941722040484F004742807306EFA9B0132027320731B727E410C80B3268B38BF71F80C7A088416A438948180A3BB1DB44C7"
DATA "CBAA980889885908AD3BB4822FED8A0A6623831EB9BD6C061B720183A04CB4A9CD8094A70533735D64E70329343323A0E409C5A1A848343504CB724182D7334ACED1DD08068F"
DATA "32064BB6617F8EFF703C0B0A302EB9E4923438282C9DE4924B4044B060CB0E59CCCB0DCF32FB104F582D67C94B3489837E4C5FFD9B6FCD28FF764C51658B464C593B053F7451"
DATA "6CF1D5143D4B74AB787C8ABFA037A34F99596F4C5E0FD5C61ED2111CF5008493F8453421562F078FF8F5BD477019125DB03414590B42BD5BCD2437F7060C360C36F839496864"
DATA "CB75854128C9F8551309A0807D464EEB385752467CDF1B3A57EBE568AC57DA9B014EC239623F5472784D2AD823CE0B6D90B9818D775678AF7886E425CDF0F630565662319241"
DATA "56C47BD921D570D753EE33DBF0900364025153F2B28B642B53EF750914871508FEF8DFBB017AE8099D34BB2E5BA37F36AC1E35D1E6E39A336A7936F4EBCB840D0CD7E86C2EB1"
DATA "23192F581AA0501C72D1565F4503B4E775C106C21F09BA6A2E344660F075F65E201F8849097C28033E08B5293AFF57280D40596A418358203BE0F33B158FC225902B120B355B"
DATA "7230FD20DE897622CEDC85D8081C892905F33C4FC5E044DCD8D4232323CFD0CCF8ECC823232323C4C0BCF0E433C820E8F430FDB1D3813889EB0697B38C390335110804EC4503"
DATA "910A3CB9F82415B14927B62AB18443C313AB0F0706E0160627A75FF81C02189D4BC70DF83251B67810BF74358BDE034B2264D1782B6F770818F4105314381182872142594848"
DATA "43A6DE3335698B0DD34011A823FEBE3A0101BA9347388E46C3B16B1137960556BCBE179A07106A106002B356EC216490385E94C02079197C66B7933983AA2D98BC394C1EB9FD"
DATA "182CE0318606F083C01850519EA16D3E470DFC40D616581E68F2CCFD1C05190A1E0E0070A205976AC420442F2271735F4815120A8138D651AF33CDBC9C5D1018AB27666F8048"
DATA "89016B5C5E596F050C272DA4985BCE04741C46A85D6C040DBBE80137A19393B386319C069894C7DA2689900410E5F0572BED7C0C76157F0E08B5F8FE75126354D950F80E08CC"
DATA "ACB43C25DBEB2C16FDA8EB15FC685B5670DD1C19A108B835A0505073DC5C83A15C41329E26FD703615E200B4AD6B5CE68EB4007C567F897BB10408A6BB880689BB1C9E5BC1FF"
DATA "61FB8D7B0CAB00BF112BFB8A0437880646DF0E0F37FBF58D8B4FBA5F15398801416E2501CC83EA6F1020075C7AD440E022E8F81618BBB057CA7604BAB02ABFE35F03F4415CF0"
DATA "B5C38884051D7FBFDDFF403BC772F48A85EE2D8D8D05C6851620EB1FD95B07F50FB65101BE0D21730DC62D778BFEDB202EC276EF83C1028A017DDD535E0DD36D3669FC505707"
DATA "FEB8D81BEC034152BC1AFD841B54DF5B6079B6ED205658F64AB7A04016FC2923EFBF30D7D42127248BCB0FB7844D66D5BFFF85A8EC0E804C0E19108A840D5BEB10A8026DCD9D"
DATA "AF7011204DD60B01027F6C470E889C08413BCF72C1EB1577AEB7F79F8D960E4A582BC2674B03D103FB46C37409E4CD9BF819770A59DB7B2B1090FB1383BD17120ED87F6BDB8D"
DATA "046F485C14E08802EB02881A8B3A04567DB34B5ABA173BD356A4543630FC183DF14087ED59963A782D10F476500BBC2C49483BF975D05353BDF5E43A2220EF03A5E383CBFF87"
DATA "4BD040D62EB4B988AAF1DB50EE7648F316CC8327243EE5FD4E883F4B3BF3751D721625F357E89960426A108853D3178F9CB14D3810484237D3A578184B790C8178C431486D20"
DATA "2E70485107B750C38DCBCF1CA9D84807C68EF863F680CC0275A757072073B9B10AD59EF12114C0A3BD270B0FF4398F688F5721969C6B7B6BF5B4A3CBB1468AAEE9F75DC1A0A4"
DATA "BF8D7A505EFAA14D8587066EC07F5C741139774C8377481A6DAF17895EE053C72BFC5AB5A0CF16315DE2FB27CD61D5200E06FE56B5E5B627895FAFF32A29039A15EA97F23E73"
DATA "EBAA2D4F2E6006F5ECD13C8C6E80860E1941000E0468CDD422C560CE12D495114D8DB78C90094E30889A1DEDD88CD956D66AFDB53CE4C6C45826FE260C015EC2E3044D02237C"
DATA "B050E859552028F06020913A54C677A9CE02D8C9750EBA3A97A1401F809240C67B7B19166EBFC7894DE439983602984CEA8E127FEA2EE9C030123DB072E681FB424636B3B507"
DATA "19C80BE9BC4F67B0641BC314A4DCAAF38C3D5281E8505312B0848CA8752C838D4681A5FED32D73895E1389BE6843395DE876518A37EA16C6EE39EE728A48019EDE9696EE1AFB"
DATA "D10208EB061504B785B737EBCA76F68E02803839DF471AB9A6AF1BA8FE5A080840A2F7C1C0BB057CCE3ACE898651BD2ED10D7403897E648D7ED5F0CD7EF8E4BC397908740BFA"
DATA "12C27617B2CFD107C59E9B6B45E4FBDD5264F845E08D800E2EE4788B56C27589C8998A41789698EFFEF5D7119A1781FAD473138A872690084416D95ADFDA194217223BD076E5"
DATA "A4AC3954A6DA76CE8B3B47B8B1B201B82F660472B853FA290176BFBBB0B28B6C4E0C6A068D904A9C5F6ED19700B38D520266BB4902C87CE8AA60EFB03B501A58490E73F17414"
DATA "2F1C3C39C4D06D559500A59140DCEABD05342DFA10DB1474720F567B41678EED8C3C3536B5FFDDC11E257E40EB0C2E73BA0DC8604E22031B585F5DDDB10C634566393A338B3F"
DATA "790BE0CA8D71750183C1CED1F98DF13717C0144A841F75E15E8D42029A436A48324EB4FFDF68FF9A6556E84157595700AA572BDED1BA709CB9FB212294CBA234F6E2EBF5A4A9"
DATA "A61CCAAB4BB8C9EDFC5725505022B9DF16ACA5684CB9DB940AA993C2B5105BB3B8456D8292103A5D421C1FB20C068B0C1B10730F78E2814157EB4253576BC760090B0B1E6159"
DATA "8667043CA9BAFF0FAF265694102EF09F2B153BFE73112BF7C03B56569631831B5F7831A8BCA3B1709183C4960F5B7A9AD4100095BE480AB8CF8F4D1B3D34665AEA6B9500248D"
DATA "4C98A7EC518A668872410DDB58045F3315B8DFE807D096A77CE6F157AC9BD06C3BDF1859117E57573B6D618956D1F2F9324004B5C26F11F88A13F6C2014B04AD66840B0C0B51"
DATA "38C421047577FF5B0883E03FC1F9066BD0303203148D991887BBF5567142188AA9422813CF502E6E6E044375E175AD07EC97BD82C2443DF03003343A52730578837E181E0574"
DATA "CB9385BEFD4E2880EB7B25C64628813E002D804BEE076AF406E86AF5FFE0EAC2D9F658F5C04683FBB4FDA036DB4909539E1D251E256BB09D0A90E158F81C51DE9279FB40EB29"
DATA "0A037524F51E10720F07966018850458311768EF171A04B8C7401012BAA30F856424C0B95509B80FEF1C0027706A07F833560745D802E75347AA0F80DD0F0142A404435AFF0C"
DATA "805F02E3445D8AC33A02C4683640D64AFD3514EF8B86FB3F50487783A6A618D1E00FA7DBEFD61D33D172DD98D9C8A3A8240A59B9A033CC141CD4A02118B43BE8001696A2E061"
DATA "57CBF74A06D150C51A0E3A7BA760EB96085C08E8042854D896E82C842614FC7C2D6B8C752013310D8C33C64DA5BA8DEE0873A2DD32C097405630ABB361A2DC02AE0940235186"
DATA "0CF245C64CCFD778D55EB77C75E2A37F9D5E21AF0400102C45D343C2EA0B6A17EC850A1E2F00DB01905FC0422ED2F0000204ACDA91870E05FCBA68913577D3CE1343E281D846"
DATA "1C94A8420E08C10024F04070244336543873C85613422D4DEF31060CE2144625864867ABAF9E1D2D6B137009C9D91B9006B87C06342D3AD8C93C30416B0DEA6C1BF8BB286D0C"
DATA "03C83BC1740FA139504B094009D84045C1753FF86B2A19D937037E7F59593258E448AC300C3482702007383CD360C1412C8BEF462CFA26CE053CF020E85DD4215DCC37EEAA2B"
DATA "32E31D6A085F997F187CBF8D124E2FFFCF22480527E5ADC4FF754CEB1483FE0BFE040F740AD8C4F7E5147E3B167F36569EA72DEB4509811B8382D852F31A02C63E496EFF3322"
DATA "E95A8502465B65B212A00A6E770CB4EBD19A32C9857A0FAF8BB75F65D000680BFADD8A8D407F6B1512DC00C645E2005ED8F7C319D51D1470CAEF10D3CA24C1B691034CCEC240"
DATA "DCFEAD440BAAF8390A55C88855E284D274270EB458987A56089A66D5E1F6EC8A0AA3B854F9D80577238B9A106C057F45D0836304006C3B67BAB7BC2F47638BCC09B08C188CB0"
DATA "D070226B05C22CBF03CB301BBE6133C823C4CB2583600800C7EBF0D058600165760ABD8CA21F01492C5DA908DD85B7756B5336A178B0821B54794DDCF668303462DC97949A8B"
DATA "B2DB5658558A0065C830E300C454C212F6C3562DCC45BA52D1D1D06A5B0B51182AB529CCC17ACACB00884484104084D54CD5A18C0311D39046C8406D6AB0068BB33ECEE50E21"
DATA "EEA490B516424D85FBB7C6ED3B0CC522B5985D3DF82D72F18D41ED07B60D6F7F1177056A0D58258D81441F6A0ECFC8FA3A87AB1F1B39042F9CC0DDC71056415048518908A118"
DATA "AD48A39E54056990C244C6700676682E6CBB0670C33F14126C10581C167C0110500353632DDCC02DD45D108F11803E9714DCA18A046A93B2162CC02452701430D04BF0822EF1"
DATA "83B8A841A3190C046D8CDA58C2514386061D72470BA07BEDFD4B5E3F11507EFFADC1735B694030337F04017E273B5F0475D14AD57C255263695055DB62475677049309059D09"
DATA "72230E9028492672C36E5BF02E807E01DE8B37EB313141BEDD6B6233814757357051002274320E09F6F7C802B3B02A86C75F9B48D1A4624AA71B575A46AE0E4A7CC7B9706750"
DATA "A101A117DD3E416604A0819451E690437608172C0E043AA925273ED10715E03AD7C8043120407F0526E8F69954D4035EFE780BBC7DF4EB5BC67D07C1A319A0AF058BFDBB0E58"
DATA "A97D514199E2586E31C83E824246C754254109573013E7B3808D539710780663F1415BF7202FB6A28BC60D15FED7C1FA068934B8303B6BC83082152E8ED095734408E35BBC8E"
DATA "AA541D04A2D7103B1797387F384744F875AFE187731005EDA75A88FD0138D6E2A27B54FF346F6AC136B65C420C595206658B928B135A8483B72123C62E7BD8FF35B025AD59E9"
DATA "B8B293252E7C5D13801820D59078448A8315DC8CE750B04DBDC904C9C9054D894DD15D8622B17C1D53BB347EA676C9391E86FA525DF3291AA128F7BAEA09F8576850AC17825C"
DATA "408701C0E03B30E5044E95E5B5B53E6B51B2484C89407EFC08E7E8573C4B90E423C4311AB0BA10DFBBE3AE3335582DF8D8D9550F15BC55EB992BC2DFE06A415FAD76DC765B34"
DATA "CD11CE28996A5AF687DB05F85B0FB7043102720D04C3773FF36D1D6C10D03FD00606160B89E0DBC806C0BD02836DFCE40AD0A56066AA05664B375736D7564F6C8B1E02D22B86"
DATA "BBB06D121F1B792659FF80AA83787CF78D79018B3BFB0F8E6F157B6A52DF46B9047E2C95EB0CE032DB1D40341A15C7DABD78103DE4B67309EABD0075E14B3056E3F0FF408A48"
DATA "7CC94CF0D662030A018B88BD0C2B2D3990808C438CE7B61D7F48285E8179F8E468745911C318F0B05F37D179F41351FC0FC1101A4F7A4795D6FFB09C8E50E3733C0024030A10"
DATA "862E802E4775C16C8825D86DD43074C07C0D5E83FA84FA4EB6591C84180E13CC24DD8F77FFB631ED80592180F3C25E0E5D7EFF767C362A6BD06CCFC98C45400E902D2AB3CD5C"
DATA "654110946ED9613FDC2BC712980D4D4F36D7908CDB0D9C510C6A2AF785591B588D9EA00EB57E9EEE13B6F87F241D8B076E140F2CD4B0C142338C567F3679BA3738168B47FC23"
DATA "0C071BDDA34635C3C80850756020CC88B084F26AA1ABCE2216AEB4400E8EBA1B6139B781B08240220A96551D2B7F2DE0B5CFE5434D2918D2249B10EC77DA555E235BA25890C3"
DATA "1C2B725848251B67B0D0734C48C8811CC80909094372841C090A0A9CD43925513CC0809EE29392E1F88B0DF88FBDBAB87428774C484310AC1F8161B60E448D474C50517C1702"
DATA "14075231110B698A5725D8043A344C069F57513C0003518286C9382403D8051F622D56374F1CB4EF57DF8AC20199E3B875E281FF45003E0095DA578F825C211AA3E3C68BE055"
DATA "70FA2626222027C5D61813F164E92208E84D1CA447259A22DD40AD275CA2550819B0C220572D13265E48C77FB3108943B5C53C1BC2DF9AA6306BB2991C024B083BD968B6D142"
DATA "06855D4A0A2E502567110884757719F6DDD6CD0F698A5FF4E060C706CCCC18511322C8EB926A40B93DC1451ADDDD8C8959B4EBE9F7103453781610A35C9012D1AB61D105071C"
DATA "4BD70A23CB5B111850560CD0AEC89F2DFE3153D95954F445E883A052F428358DA3EBB80194BA01481217234AD26B8C8032C77B9B862B53A8187E148D2630C46FB45F0704C659"
DATA "8D70014304B90A167424E3143DD4FED18B7808890E0C28904398D0DF564C495723CBD29C8D01144AD152E4411E660A494A1D3BD161B335BADC01354CC7034DF2BD84171C4DD8"
DATA "591E2D3E471C2151C308D314186085D7604A538E4885A4FAA0BE82FF81F8E05C8A26F4575375B53018822BD18DDE20F77E8B576F847BCB3820347A3D0F8FC29961DB11E3C951"
DATA "00509A3BD936645E85A4D255E6E4360EE44A2E4A19FC9190B13BF164C707E019EE196B4FC1491ADCC7FF10988B0C8738676971836DC76B18DC1DD7D3753A060123846B1FA535"
DATA "94D942333EEE2E573200530822251BA5762BEC240E7604C8EBC02DEBD2E1B6888C344CF07B28BF010261F5BA53F98C90AA51157515218C4E7075860836640AD432DDAFEDF01E"
DATA "71EA19952449559C7401AF57104009A3B80E7625E42619A4A2441EE6DB66DD84151964D813D8E616F0668AFF1C306A409AF5029660987D9F68FB7FDFA3FBEB488D87593BF874"
DATA "3E568D77201E53BFD193C1ACE0834E8D891E8D7630FFDB46EE895ED4148DD81C0A0AC646DC0A8066DDA21D1BF1F8885EDE48CC7C5E53C2E0C1B076936A4AD12B7125530B64AD"
DATA "C28C62A1560EB2FC1C060BD030BFF2CA5BA18A3C0FC514A0ADD00E7045E03675173581246387097E0F35290EDEC4BDFE7750ED4003DFDA7C1F39EF0DF1D434BD53758B56FD89"
DATA "040D13029B1C513D0C5EE558DF8522D03BEB3D9540A30747BE96D1ECEBBB8B59AE19C89C3A3F2BE8C03003042E5790A9EC22808456AAEFCD0878673B3569733BB67FBA5ABE33"
DATA "FFD806BDF6440328AF05FA461544837C03473DAA2E2EDC8223767523FF2BF03EF62E9CA3EE3104E96AF4EB08043BD8D8F2F5EB03F667DC41834C3ACE602C81321693098D1285"
DATA "03D7A996414BC24009DE1CB037A31BBB1C2FEB43DD60EC1B5D78273B0DA71F8F83E13527CDB2A5F8C98508069256D65EB34C3F03CD814DD8690D613824E05EC9201C0FB6628C"
DATA "46E6A21CC156BEDF808DB655B8712024033C026263DB1425EB4B0BA8FDF645AB1B2D2370392B5AAD1B8D42374AEE7E303C303BF853F94BEA59509965E8517BEAEFF60B6A1058"
DATA "F0090649113849DC761B73A8D26AFD1321069365D3B48CC999565A91A3EF15BF2E0859DBA43A1EB000629B6D0C3B0B125663A3323D3B645FE9DFB55892678B993AAA1CC0092B"
DATA "76447F6A086CC1060F6892A671860B375AB465D47CADE03BF8742FCAC0C68B3EDAD82D23A61BACEA4D24597D477B0D07E26FE33283FB14111C5A4159CA75BBA5F8FF45E4EB1C"
DATA "321823D1E8220FED80F7971D75030945DC7142368BAD7417A0684BEB956D8B1CB997D4BED86238AE255B605E495BA146DA8704DC80900498B92CBAD3B1B02C382FC2C14D60E8"
DATA "05305012482500FCE4590820401010E8578281900CA7FB38127C827174583904B00183B5687549F1F4169819D99DFAB0F66C68032B6B599260022770CBDEE8D80D8324C746EB"
DATA "9DE3A485CDDC5C39E0DBD8B69D956A5558C07524F77B55F308061B8851B8BF44C814950D3607ED00848CA5F2083E805DE0886129CB073CC8C836845F111040C8808C0C144418"
DATA "808C0CC8481C4C8C0CC8C8205024540CC8C88038683CC8C8808C6C4070C8808C0C447448928C0CC8784C7C63A5E0C2FD746A6830033232200434083232202338306020252303"
DATA "3464985C35016A943A2B7AAB0B8A2BCE2E03C1E95663458E06D971434770A083858DB4597DF0070003C485A2D079826C859FE55DE78D620A5090E4B02DA20C0A6830E0B31F0E"
DATA "6A020DFFB6A00E6DC8255B0AA4A82E0AD861B1B45D3CD00D8A6467DB8D4410EC5B0FE465AE77694C0154015C72D924580A5C600302DD8658285E1C385E28341AB380283C4080"
DATA "3C04478A2EB4F41268C39E104B3E37F108E15844115F45245B793867B030E2B7B40721D475D25F59591B596DE4F81D40294857EF50111E08F580C383CEFF415FB50E803C4058"
DATA "675F2988402521DA44419A1832654B6F373832679A2FD6C6C114970726A96556BEC1EB1365C40006CF5E23240612C038E8FD4CA2993853CA89FF055EC0047FB6D0894DC8BA11"
DATA "B4E844181883AF03C789DC082D4A16E8AF6616E52A517C3626B535107F3BF90F833D7A2F136624BE8146EB9A886DE58B1412E3E1FF7F8A4C1A2DF6C10474198A441A2E80E1FB"
DATA "880DF4186888BB5B21F5881A50EB3AF30EABF50317770FBA7066851432048520C6767DDC52C1AAA8AAAEF88857F076B0F85C6D51960DD2F018522D5617E61B1AB71C16748D60"
DATA "47436A059020471A24E0064975C89BCCB55AF8BE4A9158009CE043D4C0C8D62A501ED8E0A6716A25C2DDD02B45D0EF622D127D831796E0726603E50A752C8CC63E20B6336688"
DATA "E059E4B55F6AC2383851E001723AFF3E7FA1E3B70204BE82EE2AEBE955D48A078B0CFB41F808B58844192EC0804C182D04295C0DA3900D6C000A200414E93E8209C2F4210684"
DATA "70DCE259189110FC0E733F4AF1471BAA1FCA6D4D59A76C0DB6AD12832002F6AF15B97303B65B17106B9B83C702E3402C7BFC72CB760A8E4531160B2A85196968B3DA755857EE"
DATA "E6F6D1B1E02F302880741FB4404C633FD820F6121E807C3029003C1AB11DCD1E9B1518301875F832BEA8ECE55F95B81014866819C7AC8BFC9C346AC890A1C15B615E53A40842"
DATA "2D88627F85C851684CC29687547CABFD03C3836604000319898DF0EBE1DF7DD79CF805EB658DBDFC073BD8731E8A03433C0F5BB8FD6E07FDC6070D47880792FB47388B27A815"
DATA "3A1F72DE8D8575078ED953D199FD57113530D66808DA491B0176EF6C0784721A388B6C5E72974B91AD12C1DEDBDEFEEC59D333D2D589168956040208EB756DE185C9DD2BFE03"
DATA "83C3F1F8E10C1B0BCB0D8302F55AA317E692C95CD705E8FA08EAD18EC0CE9E83E7FE1357ED879B4A06401856EBB135630733DBEC444DFFF915DCBD56C86BF7C1891E58B69EAD"
DATA "82F4F45E5FC8BAE5EEF6BE89B510B250F9FBFE7321F3D8B26D17C7FBF909F71083C0FD1B005D08058DD3C172DB53536855FCB5EF56948D8DC45106382BC1D11C44DB0A8B8D50"
DATA "1A1E756673B317866CE8FF4C10731D7319EE2BC31EFE3E096FA987EAB59B2427039DF0C406271F1785E8CB612BB5FD1A4AF833BDA2730FDAE90F082434B21B2C3BEA0C62D1F1"
DATA "289B03186C6217C0934666CAE78896FC2CCCC0120C8ADEC1FBAD5A271BD8C689CB81246E10909D1C69560A011568D4FACD62B0057B02218BE03E055702B4226AEBE036F09B41"
DATA "3C66D3568BF83D0E5CED65F766AAE9D4034880196C1556F049D8605911757A301185C2C0102CA210EC20585B6D85C91C5B82277A68CFE81F522138D6C656169F2253F7FEAB20"
DATA "972FFCD05DE47C5A0BE8BF8955E88A5C102980FB840421DB5ED8E428EAF7D0A8071DA50BADBD6453504D3813100ED1A0D528206E70D786A07289236BD79B23DEFDCD62783984"
DATA "DB7422FECB530F87EE00D97B38B2C19AEC620B28F049EE4714EC5B1692605841C5D9C0D4EBE6A10085056F1668223A01460FBEC325B7D6745B2E190453859AE407F6B13C63CD"
DATA "EBC10F64BBEBB1508AED0F62EEEBA18B4C180BB7DC0AB54AECD505F48D512318A5613494A8188101DADB2D358D75027DD8A5000C8986685D186306732426236389625E60140A"
DATA "A141F4F78930EB3C654A2D59B49F524B825FC34DE847FB93E003F809803F1AE51BB2082E9D901CEB0312E05B55031B92CDCC00FFD006F17F84378262EC080FAE5CF07647C424"
DATA "04F125807F103D801F5FDEDA77540FD93C2466780383E07FF87F8D64B083DDF0240875556B6DC4903F74323BEE869E8305ACA0DD142496DAE642C174C43C69848D543DEDAEE5"
DATA "FE1181529B38094D0C66810917E0ED8D7F4B06D92D4FDF88A9F87F7463FF13D05EA93341D9ECD9C9D9F1C46CD2BB5C2F851C0B6A6EDD80BA1BB94A013F7B74E72917EBD4A9C7"
DATA "76D42AD8901D74C31625BF0ABEFF1674C5DDD8DB564021EB223B392B7C7B684E2AC5BE232127333FDEEAB8026BB00A9093F02E3975E35AC34FEE0D77DF6D894FBD30EB00F30F"
DATA "7E2C660F28EDA5EBBA1559A007C803F873D034047ADB99DB7EC018540507FAD003D3CAA9DBEE82ABA0263DFFF87C7D11F375DBE5F6CA3D320C0A7F0BD64C47DD4BC32A94DEBF"
DATA "0A2EFF7B24BAEC0390F46150C0755F28D483C214080803E3378B998E83761F282E814AADD95EBA79D8C2C1065E03255A01FBC19A04B08390F20F58C866A7DBEDBEDD14D06DC2"
DATA "1D08B006261D352B8274225C5BA281B18874E21B1A59B2D532B60E11FC30C79AC02FE0EB4DD5F8510A8734694E4CF00F17D3DFED4D01D055FC23C24374C70BCE50A9C84327F9"
DATA "EA11018B8F08643128FDE830155D48B96B9C00022584B09248E096E0EB518257ACC909D822C439CA30F83B6CEE24C4BE799A4EA6790A4A3F147013837E8FB43302B65876CE66"
DATA "0D74703E14697AB57F104A2D18F248B5CA000B30D480988ED7E06CC4323B1982433CEA590848EBE8BADA468DC0836035F292DB3288436CDEC1F8E0CCA89810A71FC7E01D2C8A"
DATA "530C0BC9744D540CB751EAADFE41B35AB6208D494C260AE4399768222E690AC0CC01E8013AE89BEEFFE772063AE3770202E63AC709C3C63AE0750BB65A81065ED1060A92B9F8"
DATA "026FE172E902F7D9F55B5E5FC975442729AB0780C30AB9100CF6B7F00EFF4EFFFF0A4CFD6A1B0BFC51D3ED2A985042EDE1E266494006031EBA73158D82D3A35BF0E3970819DF"
DATA "BAE4F0DD1C24B9D1F1A9925470CAC986127369FAC271B20044E814C0203DBD4DD5C5CD11B8E066A6692EDDF0071DDE502500AEDB3A9A3510C2C103564C582BA5B98DFDC5C400"
DATA "25F0074FA025E430B8A9B9EDCCE020415CC60759F4F217BADEB9AEFE0BC41F3558C681E14C00141BB81B2281F9FD3EBBBE7A77FB59FA726803CA2C2AF19CF6C1E10AAD107317"
DATA "73B91019B31B27EED9D7D944D1A7DE06D8ABDEB0590ED6354C757C59CA13C0F29AADBDC60F28A48D0BF5AAE53B7667A154E5668D58FC37F2979D1B90D8D0130328F715F6EEAC"
DATA "73750BCB1E0EC12215564C2E35DD58C103C6C7C51344DB604170E15D9E601FC2BA8ADF86C815C5C1B677483C5E4B58B6D9EBFE776C297079BA110E6858C239D0C233B7FFF574"
DATA "0742DE88C3BAE9033AEB4F2C1678DD16245EA5126A6A08E36EB007A6340E70D0C1BACC70CD19FE8150CF83C1016B767C2FD8DD7E05733A2657C93DC9BA3F3309B4DCEC1CC4AD"
DATA "0110A54B02B30604E0107777769E1C54BC7E7F73D220089C7D1B5CD160CD0BC1AFA0A8A61D256654406D8FC6C17EF0DD85708EFE0AED753B99EB0D10EE85DEFD32EDD9EADEC9"
DATA "63718AD9E838F6856115DBBF2B14A20CF1F6C2407502D9FD337412F0DB6D05E0C9733427CD0BF6DDAD55B436BE16F6D54CE10C1A7CDFEBAF1C5404EF9395DD773F1BE06002C3"
DATA "D9ED23E49BDDBD600E9B8360DB67604175D283C321C6A5DA420FC30AE9532E4D453ED7BD02320CAE237654CDBAE8EE59140ED9EE3F06954BF3CD86437218EDE9EB237BF6B5E5"
DATA "2D3B4206F158826FC2866D290FA94A04C636EC3B9242039CAF13A43BB2C7DAC0F50AFEDED9D9951CD9EDBCACFC6D8A95CFD8E113EDB7DF2D3BD9F042FCD83CDFE09E751A0B05"
DATA "22DF8EDC36DF1213DE9E31C258111AB8C0F857F7C623E1EBF1562B748BF405085559886E3305527608067C891A6D7B14DD66110607E4CAE097F585630291807A0E05E3BFBBD5"
DATA "CEB79D5C8080CF0280E7FEB33FEB43BFFBBE7FBB3F1366899D5E95AD05BB876ED9E589956CB39D307BBCAF0200CA8D6C6CF4FFD0E1D0F9D0C18AC1240FD7AAC07704C036F84D"
DATA "7C8BDA03D883C3BE2366ACCD0A012A671D1736FF581710AD78E5D0FDD0C58AC58AE0AEEC76C085D0E4010AC48BE8706CA11D013CB4C309EBF636E16CE3D43DC30684F40CB3F0"
DATA "763FE8C3DBBD6261DBAD05C869071B6C23C50890C307DC05C801D676B45EC3512C09022B053BEB07084B547AE6026C203E019A79C8D8330480BD1C7F0AC96F6B332E54BD12AF"
DATA "DDA021F51CA566CDAB1250A9D1F4235ADCE189E07BE8DD55E2D2D6DDD9034B81E20046AE420F80CAF16FCB160847DB6C03C399730651B3B1317BC3F5800B8FD1471B8825E63D"
DATA "EB03DD026BEFD87811870ABCFF7F89443A0EDF72B7BE8B0A0FA4C887E10B0FBE0C24DB2CA2E8DE1BA9C40AA93F1DC352630366A2430110C34A316AD40E03D92CAA8298E98EBA"
DATA "3D0E1E882074150F0852B165F40CB808CF29A9F62C02CD088BFC55EB141364672724743D6B5F5802E790CF2A752118E941BE60E5FA1D5D64CC4F06C30855AC3931F7DC6D399E"
DATA "BA1D0F9CA4B86D2BC70CC9D823BBBCEBBF28A4942C1ED98C03769EB4EB961FDBA2403DC4E0A249180593DDA065F01C0BEB0916DDA84125885D6AB7052890ABF837C76657EFA0"
DATA "8D34E0505152947D6778E442A3DD57377D086D08C9482519244B24F49B805BC0708A741050108071BB143D10F305BF0849A5AEABF64D27F81A0F8F2130190F051FE8B96C0E0E"
DATA "A7008E63592B03DE3AE0C174788A6A040574568FA86B86E09BD2A2CCC85F5BA17A07CF6A0EDCAFDD5BDB4C01D5BAE407ADDC42B46D6D07EC8E5005F4628CCCD61A973C5943D8"
DATA "760418210A7822DDDC4F4CF6D92E0E77EC0BC4EBA217C445CE0E83DC4812D032D605BD8F0F74515D43990156C9804CD40474B083C5865FEB7C61EBBBC3DBB7A12981DD181D27"
DATA "601B745B09DC2FCFDB4A74157439280374172DAB359D838895C1801479DD673F986C44C67D76930BE020033220E8D49485ECC0DCE5BEB7F106692A910B22E53140A2B843DD1E"
DATA "25847FD44039BED356683F1B81F40DD4767B392D08ED0FB74D0EB88A0EDAAD1F1423C82552664DB4BB0DF937208652481CE677B66858A90E882F4663FC0D8EE106EAF0538810"
DATA "D8C1DD5C244DEEBBFF6A0C6A08EB3F277E72DD55F8237EDDACB5F4B7E1F3F6C4447A12561153AF44F25BBA19F81EF6C380E940D9C90C72F15D103EBCE7773C921F51CAF16858"
DATA "4492E611EAC6308BD6C6A136BFBA0B757A19EB0EB09515F10A796620258740A8B078F0A8032C208053522C0F48B879721B4614C98015417C35A34E18B8C20454F16E40E54EA1"
DATA "59B7CD51DC8F09F6802E080B0D027562A506F01CF640586EDE2E41CC0AADDE2137580E8CBA4474C8FCF4B6517FC10A3019588A593EC8072C24E7CDD7C644112882571802F01C"
DATA "65011D50001402730A552782176EACF08BEDDB4804050B8348690C0768646C1405181CA8D11D89E20C87082E6A03026880633B43FA04DFF8890CA374400768A6C3AC610CFE41"
DATA "08D607AF8BDD7DFCDBE20FBF073D201546019BD97D6F55A5ADB660F7C223256845AB0B94660BB46E6855C2163FF82B5D44236865F5FC9C0305B6FF64E008DB5DFC9B0E0847CE"
DATA "64734D3311859B0C23105A74D41B1411CE095C8DE81AA73DEF0D201E217397BDEB18869B9A98970D914C2D798486B0A89016E969D9754A1250454A19EE074FA5464E2B48E840"
DATA "1F7AE7C94C6822F8DAE9204135D82A28584BE892B5D6710485066947B90D761B9C0A9BB806FF395ADB26AA560D4F7575B0D8786AEDA7D1AB057A0F6333DFE9E5E07B1F617D5E"
DATA "177641A8ECEF50B9DFDA003D1A6139453FB2772E39350B203BAD5D16999E5A610C81CD6C0EE20C752E701D82368A1A9C6DA110484180A15DAC193849553F7B62A8FB20B6F6EB"
DATA "5C743259A3532CADC51E82237BD23BFE3DAB60C9DF8BC8C8417513219F9B75757520131C4EE4110EE581C3601EE025E91809DA23058B538BDC58BB50170A54AF356B049D1C01"
DATA "4BBB04284081975E06A84310F0730C573EF7C1EE46B58D7CAB8B061D290476F03CCF20170E1527757216226EB5DE866A1222115654DAA82C041FB1A3E202C051B4505763A315"
DATA "3C727F8A478B4B5952B716E56D100416740B925465C0C6D2EDEDFEEB129DC0DD4615E0E35A034FD5627BDBB07FC03A030810BB5BF51A967EB080504A816A3C30562A4A9168F0"
DATA "518A5AE608BB833E5D7CF004EE047484C01A49A13F080F19FC0548847E59378BE35B5C340A189F3D91C680513864AEA8DD777B51FF046A05EB17A808DE18A80410361C412968"
DATA "4B8203AD01D08AA165B2BD6105C202035451208D4318C380F006C7FF7308172605B9ADEBDC501903101B0C0620219E397093F38D3737347E88151CD6AAD6E9291C2C40BB6425"
DATA "DD38351869E768910D6FEE453847A12D145F57FBAD0FEB7406E4A141119335560E52085D375917BC858A5F01A18BF344B4C68506CF0416F681F9B8DBAF55193B655915F7E99A"
DATA "90CDD02ED2C323171A180436805AE4FB33399AD8B35057370870900822425D44C78BCAB967237D6AB61FC55493743706081AA69B6B8BFB62C4C6DC195C97EC1D1FBFD8D17B4C"
DATA "EB48150F200FECD92C1AEB32157A1E60274DC81E0825EB072C836CDBD95619A2FE02CB3502B39D1009C1915E6D77A315A1014743DD014576D283A7BB740F8B91DF01B995AD60"
DATA "821E854FEEC056DEB60C85FA53DDAFF02F3DCEFBE9DFAADD0C7D0745A847EB59DED933D2AFB2D1BE3D01422CF6B903FC1CE50F71734BC01050F63EEF7D2B28C7D65447F081F0"
DATA "56CAD4EDD60279D1E80CF40136147726DAF30D2E09D16DF41F7A75DBECDADD0A85D2FD3618EB8BB635A80361325F275B34DC77C27BFDBD11CFBD2B0E6B54D815EFE28A450BA2"
DATA "5E477995503481F3540D0C1C8F6B68D7DD33304582D657BF8EC0D08A6D06DC050CBD76B7017A1E88BF8F180958040FDB9A6FA9AD0C0F938334021093E5E464019104044D4E96"
DATA "938E0808900062505D110847AEBDF505A2F7D0334130E010310516870C566A126A1108D1D63A6490E804C18C124736F70C020614120523C3016C7070111233D034DB4F345F07"
DATA "08490C100B0445B21CB2BC480C0808041035E7A01C02EC0BE54E4E0EC39ABC35220CC5F6FD6B292E0803EB218B0183FEFB3357077901E00EFD0BC3EBF02220DBC8F720FC4503"
DATA "203E024019E4CF2220E3EB1AE7B8B20CB64A0B4BEB0821157CEB0234C1E1930881E1E0DB6EC52E26310896207D20442C40EC8F1AF86020E1EED951D958101DD0BEDB6F60365D"
DATA "1C1A60E1150317ED6CBF467F574120A4E308ED4CF27433DDDD4D22B402DF906045DDA03BBA020C3D4426CBFA00283CC42A267DF65E4FF3745F31038326FE0808FB04F76F4FF3"
DATA "3402EF01DFD2BAFFF357D5554F0E0310356A1EEEAABE040D6828810E63EBDF1F9ADE940625FF510D618906EB100FF78DA2DD3D041DEE211645096DCFF76C4307193E091A18EB"
DATA "DE59B3BD1A0623C22702090A0342BEFD171E265ED6D94150D91BEB05DD06DD1B5F5BC0834BA245F8D0B480D5AE8D0777187B21040F5B02D62E550C1BD5970ACA228BC13914C7"
DATA "E8BE05EAE54874081D7CF1EA0C104C5C4B5103E43755F0041BF00A1DEBEC2053A786114F7035A01894E5C8D5AE163D055F24904C06A62002A071C96006CF20260756CAC58695"
DATA "EAA85E3635291072DB3BBC1B1A202B121F7AA835925C573809DDB1BD815A8EB3861B56667C0E05B0012EDAC6A918757C4F55827A51797F04B35E5B5D616AB8BFABBB7E2B4800"
DATA "DD550E10751F0345836A8DEA2EE9BEDFDD52F7010903D24F1774E85289D6DAC8DD45B9EF967FF1E00ED9B51AA81EB8C00F0BF0371935DC8E2E0B23A95BB2166EEB23109F1293"
DATA "FE2A7ED07715C1EF0481E752EFFE958C3E18C23F385F509B70BFCD7927454D250F5CBA8D8989315A7A271404F0FEC9C1F0E803817D0C14DA3F98993054E1C812DA235720430F"
DATA "4C11D2C2BFDFBB4D0EBAF87FB8CA663BCA036AC24281DFE1E8BA1C0D11F76D1A2ABAD8CE07D004DCCDAD317BC3D43827043B9503A397C2C27533EF52318B240F2C184A7854AE"
DATA "7546024778D775114ABB49B7C9CC28921EC62FEAE16E89061D0FF7A81938E7FEC983E1908D811F2B5E96B6E73E3B7A0C1CE08D41550B460809756E861A2B0001AF402B7A60CC"
DATA "D2958BDA8604430359DC2B6AAB7A1803C1E81BE8ADB605B4700C42091FBE0915BFFDCE3BF9720A421C283BD372E8BE1485ACA8DF8A31AA7E74F18809A109558D6800509CFE3A"
DATA "84AA32F8EB89018E77008009B56EACA81F10886C79549732CBC3BE2D135019875C0821280BDC9E4024B91FD430AA6640CE300180481044B2C2CADA20B9300FA2584407B9F0D1"
DATA "2DC2245B180881393371E417F60CBA511835FD34156D210056AE0B020C042CAA28519C29BE602D5AF7F18BD8ED075BC22D94DD8A6417D7C607FF4AD7FD03D1EB470B5C295423"
DATA "D1E9D1DBA5EBDAFFD1EAD1D80BC975F4F7F32F251421447BF7DDDBF7E62D720E3B277708720F3B2B76094E2B18305D89AD1B1214890908A58A565FF5DAF7D883ADD1556F83EF"
DATA "D38BD9675EAA0098958844489FD41B1D2555A2E41CF26FE68223F2E9455FC48A52577AFA6E050C48DF84D6ED90F7E183530506D203A52EEC6709E103D35B9ECC018A7EC2AD55"
DATA "8933ED457D15474522E0ADB9D7D2D683D800D26D3A77510E1C1C14471B187883D05C1C187A1840196492497A101818DC5E191BD829542310D1D98C8C34237ADBF11C18CDC920"
DATA "931410181CA7844F38844D79077D4F75BFFDF761135D5E5FEA80F9407315042073060FAD10D015F4D0D3EAC33980BBD14AB01FE8F5094D518D92A9B4546808F7B80F7EB364B2"
DATA "4D710BC1A18BFC1507F2013B0C2F4FA5C2D3E00A20C8F3D033C0E2830098FAE4D44698F83BEC522FF20F2CEDC9C31B1B18B0808560040258FF3580497574D3417343815C8D36"
DATA "20BED95E3A0D6663DF7C2EDF34180DDA066E8D3CDEE9F31ED956DADC51FDE82481F19781C15383D00059B0253E5B83D2662C1D17FD0AC4C9D8DA5A08F7C206D2D7FE1575B8D9"
DATA "5C5303C953855744F9F904DD4F8516DFC0C4259DFF3BC8F272FA04DC68A580947BC78A2D0029EAB600A7854DE7CCB8740F63EC7405004F8B74AE4CB7DE3235E37C6206D103C6"
DATA "CC7608A27210F03BF80F828F0CAA416E8282D20473F3541BCC36158E678E6342E1744991A4D2C9665CB25BE2C733220F30750EE0BB6EC11C692B0783A925F7C7EFC97373120B"
DATA "859DC6AC012534A04BF0E702730D38E904C609B8BB45977F0412037311325B08966D0E140808A60F16D6689B6D08350774651E84532DDA4FC0B43E6F4EF4201EB5DB6DBBFF09"
DATA "5E102D30074620046E30FBF6B502E4D00FD3033A0FD90C05E93E4F777F1F0DE0C247100ECD7DDBDBE7EC6F2062307DB7360CE818A632C3F25AF8F8F75B08402E644208080190"
DATA "E5FB08EB56B3FCFC900B99B004570404CDC22D3804307C13316F1050A2A12B257F31109E1A2057B25DE1E17FC29B01DFF7A4FFE0A874138A068854B308C107495B1241E5185B"
DATA "6ED123AE02F71BFB6F87F3A583E203FF249536243DB4900406A369BA03BCC8DC239004FB07F64C0B8A460188470111D8B22D3363130502022B32CAB17F8D34318D3C39755101"
DATA "60BB8D60EE9490A9CED7882BCA3545BC6C39FFFF4E4FDDF3B073CD8C321EB3AA1F83EE776C5BA82431FDB4FCB28F50AB0D6B9A6E8F600368788C73D86CC9B29B03030F972D61"
DATA "035B13CB93E9D96B9F0F0F4987D30E75F152C359723F726881EE0760EFAE6C36BB5D06034E100456205E306640A36AB3D96E5076607E7041CD66B33B4F267F577F5F7F677F36"
DATA "04379B6F7F777F7F70B590A0BB8EAA8D9E801890FE72230D5BB66CF220206648B6676B54A727E0DD07FCC3503065CC1A2027A9678E4621291475EB95E895A8AD0F18019BCA2F"
DATA "20D88146E54F700DD544700FCFE3CC1E41E0EF1AE17FC1EA07746630DF559DE7D9DF666666F99EE73B82CB666666F266E7F99EE7666666DF666691AA0E9F668DB6339CD5D486"
DATA "EE4A75A39B5FDAEA0588211A2B8B541FE8DDD17ADB9A20202DE59B1F7430F1500DD0CD09D18B1602046774306B1ED14A03ED4659B025F0474975F7EFEBCF54635330BA022BD0"
DATA "6885227FB65BC235098A168817834693E96C590D656348808381C4C3598F99CF636104003E01725F04D082DCE04270080BBD6EDA8370DBF468006EDA16DB8BB92FEE06A54A3B"
DATA "62C12BD1CE666B6EB70A21EFD20374D1CB07EBC1A3A0C0D7CAFF36B010FC1B21EBDC0FBCC103C2FFDA7570A956E4F245C1ED8AD2812BD15F53D26054080A7E7BA426158A0A2F"
DATA "013ACB74598D2ECC16DB5114E30BD8ECBF837FFBC3C1E31056088B0ABFFFFEFE7E18F733CB03F00356E006EDF983F1616333CFDF383DBFDFD4047A0101817521250674D301A9"
DATA "EA8BB88481E6C2C465BF14175A762A42FF1842FC3AC3745BF85F8A3677EA3AE3742784E474E21D1012D76E9AA615D706CFEB91322ECE49E7BA33FE3C06FDFC941C020CAF9513"
DATA "2FA8E41094C895547FE0122436AF9564900C9AA67B04036C788CAFE936A708960096100318AB0A83A6283CAF821701C9975097494BC1E0C2BF57B343FDA0C14F0195087777BC"
DATA "840CDEA0A4C2C1E2BB77E0E018B723CF94B7F933D231584807B90FB5001B5CBA1807C90FBDB3C777F9E0560045D0C5C7D053203CECCB7FD923D8D1E133C02BC14923CB5B2444"
DATA "C25A13AF54AB76EA391E768B1A846115133BCA1CEB06A1BB2174204767EB92C24F6BFDDF94216347F0408D4C0FF00F42C10840ACE976B1B8F0D323C793C000AFD8779B1BBA14"
DATA "B1E27CF823FA75141DA3DE5634402B10133835775962EC5FD7EBBDFC7B5D282E0180F2AECBF7D9805BEE0D178A450CFD0D6E3807B0EE4627A91CC7FC68000000618328172E2F"
DATA "E4051B2E52B14C143497975C6D964DFB7B13DC2D08120933D103021704E9F3C3FE3F993961696E20496E766F6B65642E0FD2749FFD52657475726E1000A1A803BCF8F66FB7FA"
DATA "A234610052760005700069003300324375DDED2C0D2D91007305770B6ED635DDDF0763006F0072006511666209721FB299DB2A8E3105033BC936B7AD1579110F6839EBC6C69A"
DATA "3230776B536E056C8BEC6FFF25004576656E74C367697374657213D9FFD60E53D7EA666F726D6174696F6E17EDB1817D556E722D135772690F00A6E2FD5472616E736616FD36"
DATA "61DBDF77466C73416C6C6F9000134640C2BE1DD8650F476956616C7513AD05396453028B62B7B5DDB76911697A65436C69630A226399D334DDE64578A4A003ACB4C0E6D2344D"
DATA "CCD8E4F4A500CDA569BA0807101C28A17034344DD374033C44484C50D3344DD354585C606C4DD3344D7074787C8084344DD334888C909498D3344DD39CA0A4A8AC4DD3344DB0"
DATA "B4B8BCC0C4344DD334C8CCD0D4D8D2344DD3DCE0E4E8F4A6699AE6A60008142C389AA6699A4C6C8CACCCEC344DD35CA7102C507098D2344DD3B4C4C8D0E0A6699AE6A8040C18"
DATA "2844CDA5699A648CB4DCA90824344DD334486C98C4E0D334B72743A9F003AA042034E176967E545F5F62617311280B6364A83343D95A361370B513358E741B3E640B6C74684D"
DATA "E1B0659B0C2366740B76DF247FB3867E0D33636C7265F7AFF1656162FC5374723634377265A9E3D71A162F13756E26679195DA37AC001588201030361B8DED078D6C5B573D3E"
DATA "3E20176016FD3CA4DBB8ECBA1721035B5D6F70C5617B5D53749F2F2D232AEE2B0B2DCD63DD73030B03261B2A002F25D3BDEE74033C3F3E57072CDDE99A6528297E5E337C347C"
DATA "364D67BA7C4F3D032D2F253DD399ADF98B3D3D233D035E40BE5B7B60766674E8AE27000B627BB7B7430809607479A96F66120BDFD43653671420F0AE6320677561C3D987D972"
DATA "6417026E670B7697A13B74860113755C1560665B989B3016281D1F58E9179A0F94756C7420636A18396B6D6D0B6C73F48B73C26681AC613F5F3ECB5E04572C5F207F9B254B60"
DATA "1E1FBA455D81DB0223697284FD645B5D6F1B49708C63656D9320B870360B657FDF6568208223866E95BD401F8647B687106E177079286075649272FF85430C2B8EBB45480060"
DATA "5254544916968425ED0F25F9B1C050CF5B5D4A1FDBED0A376F6D5C201B730096CD96F0730C253E78CBDACA1B411D4B28A1B4543E4767443C947018D92740631256D821254F6B"
DATA "2CB711B62D7B64796DB92D1974EE691C1E662265ED36ECDF1B2A65781D97AEB247B2215B90606C258CC08C0B571448488BAF031FD6902E766164B67F202222D2B669AC20B354"
DATA "E72044C163CAD8F63BD8706C20428F436C057319B613B60BED20281B41724A792EE00EE6300E48695A47687931365CC84E1F3C70235ECCDCEE4F626ABE204C9F1C6F628B962C"
DATA "6501E864DB703BE043873272455B50722AA223D85A4C2200550B9041BAC1431D0B04960119A4198D088E900119908F90911C9001199293B40260312097B50C3B6CB093C509ED"
DATA "28B907F00FCDB3E6F230D83185E5032C74CCB93DD96CA642429E292D0336CC9E35CDA5F844146A962F3E88063B7BC95A0F2F364FE8273B3AEB03CB0BAC1BAC48AC67D45CBA88"
DATA "03D0AD307C2BAD4BD35CBAB803F8AE3470C0AF9B65679A18701BA1A8A2B008E8BE1546431570136FDBCC9B699F6519720075D269159551CAA8654D4F96C2BA6D47613D65413F"
DATA "D674DD516C0963256C7A4B5532593769116E4732A3B1E62D056200736CA565F77313602BE770076165C6BAEE651F734768FF612F00722183323F9009A9B1721567BF3024B8B1"
DATA "217315661325DB66AB6C3F110B7479885D65293B78B9BD54F24DEFB732677BE53E963F67751F65239702EB0E641D778B3B92D01DB64F753D4B790F9330C6F6912966CB63FB73"
DATA "52D60D605765C57457D73D8CACF9EF61496B0560EFCD5E67BB75C7C5571FE6C252F164A16F2144D675536205784739D94A7A03FB354F3208306C35CF0213F102D9110700DE26"
DATA "9658007043E772FB6CEB608B50036BB1496F072368A1071B03074C434D3F5341B203C43B611767B797F8B6654E5A65546F23494455B037B769BAA003ACB8C46AB5A34A000FF8"
DATA "039A507A8D43004E83B67992BB6F174B00525400575375DDD4026CC04D6354EF5735686DDBB75468D946791780F7BDD7F81B6461061F0723730805FBCEBA276E09002F720A31"
DATA "587BEF37093B14134A175A612B96176595D12B41706F34D76D034D164A73031141756714B8ABE50053654F3C4E6F76D9F735F11AFB2F88793372089D3B7182FB35073F693DF7"
DATA "BA07FB3F6517431FC1255EFB477573424B436D620D73AF3B1D536F0957127FB39DEC5F0B414D03504D4D2F64642F79ED3577634764002C204D2008142777E2771648483A6D6D"
DATA "3A615F07F7B9F7788F13FB0F8857053B1DB658640FA57507472FEC40B2C74137D166D959C25E3F0F4773119D25EC2C4F6E135B72B365C99611670F6FDD672E7B25134AAB464D"
DATA "622C02AF7B7B0F72FF790FF7BE60DF294ADB076C1F07EE74E85E675337704FFFBB267B1D9A4E764B315F75D9B2C9C65579677211737B8719221B776963736C96EC3041772F7B"
DATA "B386BDD36171838B259BEC109F8F6F0FB061039B9721A313DD209FBB418D07504D012FBE3773CD00642F7D7F0D012C25FB5E237E1F01201183E6EEEC252948013A006D3ABD98"
DATA "FB9A15672D55B300699AA67BB0D003D4D8DCE0A5699AA6E4E8ECF4FC4DD334CDB104101C243034344DD334383C404448D3344DD74C2F5054585C0DD2344D6068747C84D3344D"
DATA "D3038C949CA8B04DD3344DBCC8CCD0DCF034DD6EB201B3B18FB204030C14D3344DD31C242C34444DD3344D5464788C9CB0344DD334B8C0C8D0D8B9344DD3E0E8F0F8B300AC69"
DATA "9AA608102034402FD3344DF7B34C03586474883ED3344D98ACC0C827E4F045AAD99FB4B4A7BB16F30D23266FB707044DD3344D18050D060907830CD2340C08090ADE0BC8601B"
DATA "0B573BBAC106FB070F57101311031260837C411721350F830D32C841435033520D36D860175307575F5934DD60837B6C176DAB20707D2F48D31C72C72F8032D86083B3810782"
DATA "1F83D234830D848F91299EC860830CA1A46FA708830D36B79FCE1FD70B556594391807E826B910772001282044D6B54A311001322103C8841081204320030110422003328202"
DATA "A7AA8CC33B20018081FFFFFFFF82838485868788898A8B8C8D8E8F909192939495969798999A9B9C9D9E9FA0A1FFFFFFFFA2A3A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6"
DATA "B7B8B9BABBBCBDBEBFC0C1FFFFFFFFC2C3C4C5C6C7C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDFE0E1FAFFFFFFE2E3E4E5E6E7E8E9EAEBECEDEEEFF0F1F2F3F4"
DATA "F5F6F7F8F9FAFBFCFDFEFFFF5F22E302030405060708090A0B0C0D0E0F101112131415FFFFFFFF161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F3031323334"
DATA "35FF0DFAFF363738393A3B3C3D3E3F40616214666768696A6B6C6DFA172AF46E6F7071BEAD767778797A5B5CFB2B6C0B13601F7B7C7D7E7FFF55218C2A7F06C1FF3F41424344"
DATA "45464748494A4B4C4D4E4F47135E08E253548658595A7F024058611F7F93679F4523C4200207280379F2E4C93004380548065007274F9E3C58086009680A70F2E4C9930B780C"
DATA "800D880E4F9E3C79900F9810A011A812E4C99327B013B814C0159E3C79F2C816D018D819E01AC893274FE81BF01CF81D9E3C79F2C5001E081F10201821C993274F2022282330"
DATA "243C79F2E4382540264827502993274F9E582A602B682C79F2E4C9702D782F80368837274F9E3C90389839A03EA8F2E4C9933FB040B841C0434F9E3C79C844D046D847E049E4"
DATA "C99327E84AF04BF84E4F9E3C79C6004F085010561857E4C99327205A2865307FCF9EFC7CA1740104C6380244030F5004F6ECC923B0C4055C060768070F278F3C7974088009B4"
DATA "200B8CF2ECC9B30C07980DA40E5FB00FCF9E3C79BC10C811A01207B813E4C9B36717D41407E015EC164F9E3CF2F818C70419101A1C1BE4C99327281C341D401E9E3C79F24C1F"
DATA "582064217022C993274F7C23882494253C79F2E4A026AC27B829C42A91274F9ED02BDC2CE82DF2E4D946E22F070C3218344F9E3C79243530363C374838E5C993275439603A6C"
DATA "3B93274F3E783E843F904079F2E4C99C41A843B444CC45274F9E3CD846E447F049FC79F2E4914AC9084B144C204E274F9E3C2C4F3850445250F2E4C993565C57685A78654F9E"
DATA "3C79886B986CA881B4016C0BCE9108C004EF070F9E3C79F6CC0907D80AE40CF010E4C9234FFC13CA081414169E3C79F2201A2C1D442C503BC993274F683E7443806B9E3C39F2"
DATA "98010CA804B407C009C993274FCC0AD80CE41A473E79E4F03BCB086B1401102404E4C9932730073C09480A9F3C79F2540C601A6C3B780114E4C9932388049407A0099E3C79F2"
DATA "AC0AB80CC41AD03BF2C8914FE80118F809CC040A4F9E3C79100C1C1A283B4001F2E4C9911C50095C0A681A27473E79743B8C01209C09A839F2C9930AB43BC00124D0099F4F9E"
DATA "3CDC0AE83BF40128CD0439F2C99309100A1C012C280993239F3C340A4001304C093C39F2C9580A64013470097C0AE493239F880138940AA0013C4F8E7C72AC0AB80140C40AD0"
DATA "0A1E79E49144DC0A48E80A4CF40A50C193237FCE00047C0C1A1C61DE89CC67676200673B0008B605298B465317E7EC102F2FA90765D9E4EC4029076E273B9B3D829B075F682F"
DATA "34F91E311527694E31F90EBF576AF793C106F9576E6E0F701093EF10571772CEDCD9ECB9576773410771B3139D4176A907EC11939172758F0F4B32D8D93762D7736F90C1063B"
DATA "6C476CAF66AC3B5F6C76E77F79157A37B36E7616976D571766DF26DF896637B53F68B3B3D981E71F2F6B4FC1CE827515779F57747F93EF119370770F74C2ECEC11753F6E5717"
DATA "CC063B4B1F6D1767DFD03BD13B6F713F2946C3C7739BE9172DFB411B5C37E36E0B4200471F0B4519F1621F3313235A3717833132B67C4B0B65451F2D46EE66743952130B4600"
DATA "497230BAF74517682F154C1FF605A3632D75552317530BA79B313274541B2F4E32D28D740B624F177050BA19DF2327B3522B2352C646C646725F5268834837E37B4437EF4B3B"
DATA "47D217E94E411776CB741323F23D33540B3B544B192363DF774BA76444536C6490864355655953483763646C495F5F45C817EBDE6C6B75560BEF4C1B79788F6B53437656F117"
DATA "8C6F8673A74D770B1CD281DE5A35578F75EF6C8F24AF8BA74D1F3E8B8D749B5A78D70B7A00751EC31E49B30BB79191111EC745BB6F4FE88C8D7C8F496DB34D1AF926BC6D9717"
DATA "735946C69E27D76B5A0B794719FB5E30E70B5F75CB55EF101E29FBBB62BF9D929D66770B0B0F49BA258717740B651BB0CB4E1BB36C0B723B646C4026736D2F4D1226756F63B3"
DATA "B142435B86346C5247314FD14BD2D9F55357456A46839DA171E542C1BAC30933A56B6D53475A409206E99361515708874DE0936F87655F49DA92345857154533797A93662F33"
DATA "17336EB3200F01B350B19C268584507703B7D32B76616743E3472709DF21C965EF6B4ECB15972D0B2FFF454D06DFEC69E70D477B487D2F36604B419FF30B55EC7B1392F37BF3"
DATA "5D41C366B395859FC37B4BD62DFBF5457BF1597B3FC9069B6C477B4C6F6E63640DC8677B470054484FD98486D94287056A6563409EAC6B155A634D004F389B906449F76343EC"
DATA "8C5910379FF77363C2CE52C2A36F53D3939D116C4DAFEF4557506CC2F762175723433757C296B22961C7F94E13CBDE804C5A44254B1BD94B09834BA331B1499E6C4D4B4A004D"
DATA "5625EFB2C37B330DB933591B9B4C360993427F43331326A5A46E89636CB2C7924205234A3F9C49F85E23E3548741600CD8642742FB578B63834D3643234B176E5F48204C3660"
DATA "9F4C23418F807C2F36559B179B48D22DE1B2175167234FD9966C4BD7560B394E0B4268B2374EFD4752D3F065135ED9A700A17442237FC149CB2CD3D54871209F9F9F9F00D554"
DATA "D8D560DAD56CB1D5789F9F9F9FA0D5848FD590CFD59CD5D5A89F9F9F9FD2D5B4A9D5C0B9D5CCC4D5D89F9F9F9FDCD5E443D5F0CCD5FCBFD608C9CFCF91C87029D6149BD62C6B"
DATA "67273FC421E3D64463010F504E7E7E8844FBD65C7DD668B702FC1CF92313D680454804D68C474E7E8EFCD698875005D6A44806F9F9F90B6BD6B0A2D6BC91D6C8493C3BF9F9D6"
DATA "D4B3D6E0AB413FEC8B8E114F9E6007FC4A9368087E7E7E7ED708A3D714CDD720ACD72CC97E7E7E7ED73892D744BAD750C5D75CB47E7E7E7ED768D6D774D0D7804BD78CC03F3F"
DATA "477ED798D37009D7A4D1D7B0DD3F3F3F3FD7BCD7D7C8CAD7D4B5D7E0C13F3F3F3FD7ECD4D7F8A4D804ADD810DF3F3F3F3FD81C93D828E0D834BBD840CE3F3F3F3FD84CE1D858"
DATA "DBD864DED870D9919F233FD87CC64023D888653FC5C9CF782AD8946C2683D8A0689CFC11270A73D8AC4C2E1F71F2539BD8B8730B3BD8CFCFCFCFC494D8D0A5D8DCAED8E84DD8"
DATA "7FC4C9CFF4B6D900BC3E83D90C889CFC142737EBD9187F0C5F71F247E3D9244E2F1BD9E4E7E7C83074E818D93CAFD9485ACF919FE20DABD9544F6828D9237FC5C9606A1F5BD9"
DATA "6C6198E791919F0ED97850A0D98495919FE2E4D99051103BD99C52E4E7C8CF902DD9A872B031D9B4788A93BFE23A93D9C08211F9F92B4E2B3F3BD9CC89D9DC538F8CFC1CB832"
DATA "D9E87950D9F4670F32562724E1DADA0C8E7E7E8E14A3802BDA186DDA248338F9294E3DC3DA30863B1FE8E4AF2BDA3C84305BDA48919F9F9F9DDA5477DA6075DA6C55C9CFCFCF"
DATA "B812DA7896DA8454DA909740277FC51353DA9C8D36477E8EFCABDAA87EC814DAB456D0153F3F3F3FDAC057DACC98DAD88CDAE89F939F233FDAF8A8D816DB0858814EFE8A1793"
DATA "DB14593CD3F9F9F9F9DB2085DB2CA7DB3876DB449CE8E4073A199BDB505B229F9F9F3F1BDB5C64DB68BEDB78C3DB88939F9F9FB0DB98B8DBA8CBDBB8C77E7E7EA01AA3DBC85C"
DATA "CE1CE3DBD4C2477E7E7EDBECBDDC04A6DC1C99001B40273F3FDC349ADC405D33F2039DFC4BDC4C7A40A3DC588A0F3AF939E838DC6880399B9F3FE8E4DC74811CABDC805EDC8C"
DATA "E4C9B3936E1D0F985FD0359E3C79F2A47C2820B062181ED993274FBC60C834C89E171E7BF2E4E07B6027F86907DD046FC993274F100320E230903C79F2E43CA148B254AA6046"
DATA "450C019E6C700B926D43C2518F05650B5B9227DBA1680B64007A21674BC9B6640B8D710BF16F9E6C83640BC5770B6C00622D9B6440796D77D8804CD6396D1771730BB3092D4B"
DATA "3BC9B3E8EC519079FD05636534614B9F176C0359F0CE80BB62530B0F6202BC05838382908D7C1773613B3B2C78F12F852F63772F8874A700EF673B612F4975056B0F3F0BD99B"
DATA "9D82870B050BC0658622E10B750523DC25636D059BBDD824F463728B61270B72D94BF6AB7A0BA50B6227EB964C675B65476A00920764926D6E70006857303B44A90B1B50B7E4"
DATA "B06B7A0B7722861D92A3A10BD8B26FE6150B8F6C0B17054B2E4B2F64E4492E7B430B73670074B22DD996A56E0BC9780BF688645B15690B610B0CC8804C657279721629926917"
DATA "7523DF2B58E59B7465C682242375DB6916BC19F1531F0563F648566F05A7850B925C7618AF0B689DCD18F6050B130B6D0B929DC025AF7727103362C6BB7FB3652F38E3CF1777"
DATA "37235EB2610B05A30542B84388836161FBF086116F05BB05F166B34987A70B0543888F59F34B705FDD8470146323037A7BC192620B63630D64EC9B250F27720B7923DE306267"
DATA "3B055364BCE0050557AF4388F7880B05036464E47B55176E6E72D12D9BB1970B05799A146F08F3058B7678C104B16FB30B3420DF4B05236E7329863D920F6D6BC7F60E0BDE05"
DATA "9F62E30B9396046F05C32963D98C650FFD0FB9152F583103052020DD9B03057773ECCD66BC237F0BA70B4646BE97050B6B6B6C9B2D034669DB310F21399B2D351F6A9C251B92"
DATA "6A6E7D0F738C37C68471676C0B97C06C2190BF1704F6BD95831769702F2FD991BD172F76790BC120DD65FB770B6B7966401A9669477474ACF7CC650B68050BFF52BC08B43F05"
DATA "D7D80934618F3375237CF0DCC87570110BB3755AD8B29417C359646C042776837877D8E97482038B990F3CD9844C746E0B68006B1B668892310B3F21D09664673B773B2CE897"
DATA "BD67006C6F67315DA2431E9607F03F33F6CA6633EC0700FF07166C2CD904801F000F07BF873D9600C0DB3F0710F8178F424FD6BD61073B087F07789F50CB16F6FF1344D33F58"
DATA "B3121F31EF1F3D5700F6021B61BFB530430743729017F0FF7F01F9FFFFFFFFCE97C6148935403D812964099308C05584356A80C925C0D23596DC026AFC3FF791FDFFFF99187E"
DATA "9FAB164035B177DCF27AF2BF08412EBF6C7A5A77FFB303B4CB9CD5DCA7D7B9856671B1B0FF6DD80D40CB09F736430C9819F695FD39FDAA647FE03F036578703F9E705126ACAB"
DATA "B903735A5F3F815FC00987FDDF4335C26821A2DA0FC9FF3F09FE05C2E4EF0F0840080408080300040C2F76C2C34E7F02353E4051EFB1930D0708BD2B98C0190163C898404347"
DATA "8FF1C62FB4706F6D617369E861636FC540F818C8737172749F5888A63009B355EB24310C7740271044EC43FF37AA95989DE40AA8037C3F1BF7512DFFF6FFCD3805DEB69D578B"
DATA "3F0530FBFE096B380F8096DEAE70943F96FFEFFE1DE1910C78FC391F3E8E2EDA9A3F1A706E9ED11B35C06FEA058A53ADA03F5309512A1BFFCDFF771F63C6F7FAA33F3FF581F1"
DATA "623608EF591E17A73FDB54CF97FFEF6E33BD163FC702903EAA3F86D3D0C857D22140C3FBFFE6FF2D3332AD3F1F44D9F8DB7AA0D6701128B03F7650AF288BF34FFF37FFBF60F1"
DATA "EC1F9CB13FD455531E3FE03E65FD1B15B33F95678C04807FF7FFDDE2371FC5802793B43FF3A562CDACC42FAFE95E7305B63F9F77FFDFFD7DA123CFC3174F4A8D776BB73F7A6E"
DATA "A012E8031C3FE44E0BBFF0BBFFD6B83F824C4ECCE500CF402422B433BAE357673470F1FFEDFFBB363FA754B695BB3FC74E76245E0E294FE0E90226EABC3FCBBBFF5FFECB2E82"
DATA "29D1EB3C6CC1B442BE3FE94D8DF30FE5257F6AB1FCFFE5FF058DBF3FA777B7A2A58E2A203CC59B6DC03F45FAE1EE8D8132E5B7FF3F4FAC3E0DC13FAEF083CB458A1E0FD07415"
DATA "3FB8B7FF6FFED4FF93F1190B014F05FE51C23FC077284009ACFE5FE0F4BFF0F2FF1C30F7C23F41631A0DC7F53050790F7EC33F64721A9BFFEFB679741FCFB4537429C43F344B"
DATA "BCC509CE3EFEFAFFBFFDDB24CA0F5168E64243202E7F3009127562C53F2D17AAB3ECDFDFFCDB9B30F61A1AF20F13613E2D1BEF3F9016A28DC6E6FF6FFF3FD09996FC2C94ED6F"
DATA "00286C5820C73FCD544062A8203DC2EFFEF61CFF95B40FC53391682C01DFA0CE66A23FC84FFB97DFFE238786C1C6200FF0560C0ECCDFA0CFA1B4E336BF6BEFFEBFE7EFDF59C9"
DATA "3FE5E0FF7A0220248FD2471FE90F0A7FE9777CF26C0E331F40038BA46ECA0F5B2BB9ACEB33EDBBFF773F52C5B700CB3F73AA644C69F46F70F97CE6880F77FFEFFE72A0782223"
DATA "FF322F2EBAE306CC3F7CBD55CD15CB0F006CD4FFBFFCCB9D9172ACE69446B60E901361FB11CD3F0B96AE91DB34DFFDE5971A10FDAB599F736CD7BC237B9F607E523D16CDFFBB"
DATA "FFCE3FE4932EF2699D31BF02DC2C9ACE3F87F18190F5EB90BDFBADF19476581F8B0717EAEBAF077FDB1F8099FEF6DDBF0F6896F2F77D7322CF09455B0AD0AF2553235B6B1F7E"
DATA "FB97DF0FE8FB378048C612B9B9936A1B1FA8215631877FF9E55FAEF3BF7DDA6132B86A1D71C632C1308D4AE9EFF8CB9B35D2CDD9FF809DF1F60E35EF78C2BE2F6FDF35FE40D1"
DATA "3F8BBA22421A8F906919977A0F995C2DDDBFFCF22179F22158AC307AB57E84FF623ECF3D4F3AFFDFFEED15DBF00FDF0E0C232E58274F48424F0E26D23FF91FA428105FFEEDCD"
DATA "7E1511A662620F12190C2E1AB012D843C071507EF9979879379EAC69392B800B76C1D57EF9DB2F380FBEDEEA3A9F30BBA7B30CD3D8B61999920C060898CFFF3FC81772B60751"
DATA "F0E8DA17F2424EE080C01FA0F2424EC8BED9805D5003424EC81720A9D8E0555EC809F928FFD760AF985FC817F242D00F80C3D617F2424EA87AD03170F2424EC8ECD510A72865"
DATA "42BE90174023D0E4D4BC90177260A6686BF82C9013F28578F5D380BA2FE485BC0083F84E7817E4847C2170E3D2E0B20B79212FD87E484E39215FC8B81DA0F0D188C3425EC80B"
DATA "70965869BE9017F2B83FA01200E9D090177242D8C238992FE485BC10737049C026E40B79219800E0B4CF0B792127806F202A792127E4C0E4CE609F005A215FC80B901B30D6CD"
DATA "0BF92C39C097505939215FC8E01A60E3CCF0A4425EC80B706D002F0AC909F980F7CB00C0F9F9A11A2D1463DFD01DDFD41AF9F9F9F9DFC41BDFC81FE93013E93821F9F9F9F9E9"
DATA "400EDFD80DDFE00FE94810674F76E7E917E81E5812075CF2E4C99320600C640B6C154F9E3C79741C7C1984118C18E4C9932794169C17A4229E3C79F2AC23B024B425B826E845"
DATA "864EC0565E983B3B66560774610F6108076EEF39733227231F0765692F5868AC8C66A46F7F469F9BE8616273126D6F646C646AB9853E7B5F63185F6879C27427A63BC8CF201F"
DATA "667279300331AD7D0D956EF062136E1B636094248266701BA0420BA343CB819221B0E85C47DE5A40DD1BEA7003A118CCE5372400A1D022602AFFF9C2AB44EB45545730860E04"
DATA "882B05416918F68ABB050530E12FBEA12042221D56696143520D84828DAC2239588B51BD4D02466943613B5C00854AEC506C4241CA39633A5B58F887022B004D696372B06F4A"
DATA "2E2CFFADE1AD500A76696454131B1A73504FCF898247D0ED66FFB3E0DCE8C90476BAC9B45F0266747090CBCE7F0F60124797246DA399DB1864B013180149161FA83FA824BE18"
DATA "B100C32E30F66EC8F6306366670F1C7424584341BD09792E2C135A247C9734CF4941280C4327343921DF855A1338504190EF92E63C085827446C21CD961341484F853C276C4C"
DATA "13544150B7D33DDF5A9F6049FF72AF70FA7BBCCF260F247378069C178BF5B8A4107A13FF17B27C2EA4773107FB2C17D23C1732330139BD2DD93C34D4020064626736F207D9C7"
DATA "08FE7274632449410C13726063135AC71027546DCE1276141327188C03B78D31D2677878020191432718A6DCD965ECF40F441373C9766CB73002131433CB6792CD441801345C"
DATA "0302E6366392053687139007656E8E665EA60FF808F6D9DCAB494A5C5B88676635D225DDD9739388131C79CA7CAEA0019007D00E64B7EC0F1F0623D4DD2BE44A9E0780039FBA"
DATA "1372601FD80A8603990D760AF95FE41F2107098BEC15D603198724F5A7C2BA57D82546672A5B035FA7D98BECB70032F31F31FF3F910D6543601FABBF45F2227B3E743F398707"
DATA "F222E1445E1F461DB46C2839653F4921741F9017C98B4D8D524D1CC82939CC583CC4212FE3945B61CF5B3491BCC85E5C3D875FB624BC487A66A82F6CDFC7D5BD425E79678839"
DATA "034C12465516A400101C28227598D507048ACBA6B119BF442709C815C13FEB08F9FF0F21AB90EC5E22C0B244A5DDFD716A222A15FE25EC245B0F200593192A3BEF400223002C"
DATA "580A99107900045904230490C22048EF90422098068FBF1F004865010204082FA4033C39C82F6082798221A6DFA1A537CF9F9F819FE0FC407E80FCA8C1A3DAC8D92384A3CC81"
DATA "FE07400D320436B52F41B67B85FCDF5FCFA2E4A21A00E5A2E8A25B7EA10925BFDD1D510503DA5EDA5F5FDA6ADA3266436E7FD3D8DEE0F939317E0005D2994C17852AA4551026"
DATA "271F528BB800010104F608690106680FD125274B170730BA29E4562DCFBC13B43005D144D005A8CB431258D9A49F22818648BA21023701025D038540872EFF2E8E92DB252403"
DATA "10607F11D674C1002F286403555056BC5FDEA082001B035DB36C7E5C34000041E538CBE807E5B6274F363639884E9654036A97CDB26914F846CC2D399E526F72DB2C8DCC3C2B"
DATA "743C036B3613C48541E10BF0B93F6DB6E6B21844B1625C03DCFB5D21DCA5B957A5597D138B6FDB65599665494C0A0D6490202A925147000508D578FC5F6E51D608A052616973"
DATA "65457863657083820F40A301434582D64071746521570C0E8A7F03696F6465506F696E680720DAED01517505795003D21604B3B76E32436F75180DD8112858C8496414C11E14"
DATA "1C549A13B4F7FEED537973336D54696D654173660918773B09409B534C9074482F5A6BDF3A1473806275676762565464DBF6E64812556E6879643564B22BAC8CB94383531C88"
DATA "850A7E777461E170B660AF0390575AA9CA46B62ED9E6F0A765622B4DF5755B001BDB46484C57DE12544B66286C556D1529112402D6DAB64C61B9452752441E5E30286B732C6C"
DATA "08F77EDB2E6BA0466C757368E96FDAED080396417E53706493807011657109DD32807809EF0C534502622019FF62DBED055D6272F2798BA54164647285608563A94C6F5C1C28"
DATA "B2950B779752746C397769C45370217B1345B0943EDB1E235B2F76AA2AE774165812052BDCDDDA584A597C4D0E294279B942BBB03A5496696440C178654BD68609131E774804"
DATA "4178B370DD090B3344584663D5083BF658E36343B461367141435007ECD1823D4F454D0906040A6CA50A5AE1F7A76DC09E3B33DA447345641830DE9B9048CB8155768CD86C64"
DATA "CC0DCF79700C1A0DA66D856D25696EE97DB3D9C8104C5930571BEC209FDE53697A5265E05363BD43100925656CE1DFC3A5420A42756666A6736296BDD6186ED112E80D0469D2"
DATA "19739E53CC618D662A7BEA60F159A7D91A2C30571F85007B84C649AE4682D03033361B1DBE996792A17774775F669205B1599B0ADDB30C17ACFD532D6F795F706C61120A8D83"
DATA "BDB517095F316411657828FFFF638675DC00288D39F0F4000F7F41F00701F0F0000A73FFFFFFFF2F101711110519050D4D1D0A0E12153ED9334B135EB0314F13130C10112615"
DATA "07FFFFFFFF06120A610D2708193A1B0C0F090D2F081106060C062331AB1F0A110C09052605CFFFFFFF250D1D420E1B0B8F0908470F0736090D0B090F0A16090B07200607ADBD"
DATA "2B27082C060A0A10001FF6FF7FFF16171B2310182B2604220E708108125128A6531378A80C3C8C2CCBF6FF082A1C0F0C0E22100505360239303F7F7372BB270903240C273008"
DATA "0B0D16120CBD6DFFFF260CF0170132151A1A0E06151C120B15C11B951C200EED5BFBDFB5120512650C781A0935306F70070C130536FFFFFFFF116A0712094A12080A0911121B"
DATA "2C2334271A4CF0340116233305F02601182D1BB7FFFF6F740A050B0B1451A4130F21590B4F184A96177E4412870D0CFBED6DFB19133D0C0B7306010E38104A2005211D2E636B"
DATA "DD6F7F3E06876D0638F959192D070B741BE99A5B3BBF5DB91D08C82719950F1BFB8F0CD90A1C051E21101C34241C1F23CBBF5D686D15750E0B0F24D30E5031304BB6B7B7FFF0"
DATA "FC00147CB907281AB935111B7A361129C91161FBFFDFCD0D0A221145EE0A0D3312301D0B520709813C4B5FFBFF5BA11A73191058381BF014022D300C12443C09B4F8B7F67F04"
DATA "0604190B1B37361392E850F30023262287075F68B75F9B39301B3B37D4235AA291050E2434DD7DE10B832D121C24C22C1E0B7D4B0D410DE3ADF0BF0017C77D0918122D2E34F8"
DATA "9108182393FFDBED7F130A9B36550A230A3D6B0E0CA4101517231B0D0E0E0BFFFFFFFF1614091D6023777F2D514DD8692A2F66391621782D4689125B5486F0FA00B306FFFF42"
DATA "FB5F06A21A40321229071C0717163B0750144E14DB1F050DD86DE1ED2107970D7F7D120021FF5FF8FF04F04D01083315118616401A308C1F39270B1077371F160AFFFFDFFE1F"
DATA "1E6F29291E7E031C892E311C331D227F5CA06F0A4E4F406B1A0D30FD2FFC852443124819841509DF0A2AA3E90F1F184B087FE36FDF001E08620C14AE20472A081D10C0F00401"
DATA "314237B68D6FFF1D140B4D8867B5741155F00101E5080266DFFDED17F60609422B252A131F2B18450C07248067339EFA6F2FFC165A3D0A1B69260611569870615B6E1F31F055"
DATA "052ADE5E383A011BBC08F05974FFFFDFF80111F0E2026B1E1406F04C011DF0D4011CD2063E131E0EF0AE01EC7FB78D370D0400564505F06602F0620117DBD696016AA280080C"
DATA "02205785FD2D2C126C010400F01C64B0C29C061E2C080C0805F27784988BF09403AC7510720C74210080B2AF8AF00C0AE53C483E3CEA09D11609F020AEDD7E6BE204D803201C"
DATA "0401200804089B3390B02000C50015F0E6E816F8840E34F050EF1000185311212052C6CC6221CF4CFCD27C050066E8755600E00068B066FB02210B010E0C9A7C1317CD023AA9"
DATA "F3B06640B3C9F60B021E06077BC7224F71011E40012A0219406FD907068002590B37F4070D00D976A9E842AC75F0F9031C26A081B90310FA2A10085A612FE42F86BDD94120A7"
DATA "9990EBB70BE81282AE602424DD60075E58FB5AA29E3718402E02E8884BD09474DD10780827F8C006822D06DC08A4F1B458D9C93001014FB6693AF75EABFB0D270E023601BD29"
DATA "421B809444000000EF1B694B010080040000FF000000807C2408010F85B901000060BE00F000108DBE0020FFFF57EB109090909090908A064688074701DB75078B1E83EEFC11"
DATA "DB72EDB80100000001DB75078B1E83EEFC11DB11C001DB73EF75098B1E83EEFC11DB73E431C983E803720DC1E0088A064683F0FF747489C501DB75078B1E83EEFC11DB11C901"
DATA "DB75078B1E83EEFC11DB11C975204101DB75078B1E83EEFC11DB11C901DB73EF75098B1E83EEFC11DB73E483C10281FD00F3FFFF83D1018D142F83FDFC760F8A024288074749"
DATA "75F7E963FFFFFF908B0283C204890783C70483E90477F101CFE94CFFFFFF5E89F7B9AD0300008A07472CE83C0177F7803F0A75F28B078A5F0466C1E808C1C01086C429F880EB"
DATA "E801F0890783C70588D8E2D98DBE004001008B0709C0743C8B5F048D84300060010001F35083C708FF9650600100958A074708C074DC89F95748F2AE55FF965460010009C074"
DATA "07890383C304EBE16131C0C20C0083C7048D5EFC31C08A074709C074223CEF771101C38B0386C4C1C01086C401F08903EBE2240FC1E010668B0783C702EBE28BAE586001008D"
DATA "BE00F0FFFFBB0010000050546A045357FFD58D872F02000080207F8060287F585054505357FFD558618D4424806A0039C475FA83EC80E967ABFEFF0000005C00000000000000"
DATA "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001810011070FA00100300000018B100100000"
DATA "00000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
DATA "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
DATA "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
DATA "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
DATA "00000000000000000000000000000000000000000000000000000000000000000000000000000000000078700100507001000000000000000000000000008570010068700100"
DATA "00000000000000000000000092700100707001000000000000000000000000000000000000000000A0700100AE700100BE700100CE700100DC70010000000000EA7001000000"
DATA "0000FE700100000000004B45524E454C33322E444C4C0041445641504933322E646C6C006C696266667477332D332E646C6C00004C6F61644C69627261727941000047657450"
DATA "726F634164647265737300005669727475616C50726F7465637400005669727475616C416C6C6F6300005669727475616C4672656500000053797374656D46756E6374696F6E"
DATA "303336000000666674775F667265650000000000000066E87557000000003E71010001000000010000000100000034710100387101003C710100601200004771010000006666"
DATA "74772E646C6C006666747773756200000060010010000000BD3AB83CBC3CC43C0000000000000000000000000000000000000000000000000000000000000000000000000000"
DATA "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
DATA "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
CLOSE #1
END
OPTION ARITHMETIC NATIVE
LET S=1E+13+1
LET E=S+1E+8
LET S$=STR$(S)
LET E$=STR$(E)
LET T=TIME
PRINT "シングルスレッド"
PRINT ERATOS(S$,E$);"個"
LET T1=TIME-T
PRINT T1;"秒"
LET T=TIME
PRINT "マルチスレッド"
PRINT ERATOS2(S$,E$,0);"個"
LET T2=TIME-T
PRINT T2;"秒"
PRINT T1/T2;"倍"
END
EXTERNAL FUNCTION ERATOS(S$,E$)
OPTION ARITHMETIC NATIVE
ASSIGN "eratos.dll","eratos",FPU
END FUNCTION
EXTERNAL FUNCTION ERATOS2(S$,E$,THREADS) !'THREADS=実行スレッド数(0の時 自動設定)
OPTION ARITHMETIC NATIVE
ASSIGN "eratos_parallel.dll","eratos",FPU
END FUNCTION
#include <cstdlib>
#include <omp.h>
using namespace std;
long long isqrt(long long num)
{
long long n,n1;
if(num==0) return 0;
n=num/2+1;
n1=(n+(num/n))/2;
while (n1<n) {
n=n1;
n1=(n+(num/n))/2;
}
return n;
}
extern "C" __declspec(dllexport) double eratos(char *s,char *e,int threads)
{
long long n,nn,m,i,j,count=0;
bool *x;
n=atoll(s);
m=atoll(e);
if (n>=m || n<1) return -1.0;
if (n==1 || n==2) count++;
if (n==1) n+=2;
if (n % 2==0) n++;
x=new bool [m-n+2];
if (x==NULL) return -999.0;
if (threads>0) omp_set_num_threads(threads);
#pragma omp parallel for
for(i=0;i<=m-n+1;i++) x[i]=true;
#pragma omp parallel for private(j,i,nn) schedule(dynamic)
for(i=3;i<=isqrt(m);i+=2){
if (n % i==0) nn=n;
else
nn=((n/i)+1)*i;
if (n<=i && x[nn-n]==true) nn+=i;
for(j=nn;j<=m;j+=i) x[j-n]=false;
}
#pragma omp parallel for
for(j=n;j<=m;j+=2)
if (x[j-n]==true) {
#pragma omp atomic
count++;
}
delete [] x;
return (double)count;
}
OPTION ARITHMETIC RATIONAL
LET format$="#." & REPEAT$("#",999)
LET e=1
LET f=1
FOR i=1 TO 450
LET f=f*i
LET e=e+1/f ! 自然対数の底(ネピア数)1000桁
NEXT i
! PRINT USING format$:e
FOR r=3 TO 4
LET n=10^r
LET x=2
LET x1=5
LET m=(((1+x/n)^n)/(E^x))/(((1+x1/n)^n)/(E^x1))
PRINT USING format$:m
NEXT r
END
LET n=10^6 辺りから重いです。LET n=10^7 何日?
1+x/n)^n=E^x
虚数z
(1+z/n)^n=E^z
この数式からからe^(i*pi)=-1に至るまでの過程をプログラムしてみたいと模索しています。
それと、非自明な零点の関係も
OPTION ARITHMETIC COMPLEX !複素数モード
SET WINDOW -40,40,-4,4 !x,y
DRAW grid(10,1)
SET POINT STYLE 6
FOR x=-40 TO 0.99 STEP 0.01
LET m=fnZeta(COMPLEX(1/2,X))
LET R=RE(m)
LET I=IM(m)
! PRINT m
SET POINT COLOR 3
PLOT POINTS:x,r
PLOT
SET POINT COLOR 4
PLOT POINTS:x,i
PLOT
NEXT x
FOR x=1.01 TO 40 STEP 0.01
LET m=fnZeta(COMPLEX(1/2,X))
LET R=RE(m)
LET I=IM(m)
! PRINT m
SET POINT COLOR 2
PLOT POINTS:x,r
PLOT
SET POINT COLOR 7
PLOT POINTS:x,i
PLOT
NEXT x
END
EXTERNAL FUNCTION fnZeta(X)
OPTION ARITHMETIC COMPLEX !複素数モード
OPTION BASE 0 !ゼロベース
LET M=200
DIM C(M)
LET C(0)=1
for K=1 to M
FOR J=K TO 1 STEP -1
LET C(J)=(C(J)+C(J-1))/2
NEXT j
NEXT k
for J=1 to M
LET U=U+((-1)^INT(J-1))*C(J)/J^X
IF C(J)<1E-15 THEN EXIT FOR
NEXT j
LET fnZeta=U/(1-2^(1-X))
END FUNCTION
OPTION ARITHMETIC DECIMAL_HIGH
LET N=10
LET A=.5
FOR I=1 TO N !'(((((((((.5^2)^2)^2)^2)^2)^2)^2)^2)^2)^2
LET A=A*A
PRINT A
NEXT I
LET A=1+A
FOR I=1 TO 2^N !' ((1+1/2^1024)^2)^1024
LET A=A*A
PRINT A
NEXT I
END
> A子さんが映画を見る確率は土、日には80%,
> 月、火、水、木、金には60%です。
> ある日A子さんは、映画を見ました。
> その日が日曜日である確率はいくらでしょうか。
>
> この問題の答えはどうなるのでしょうか。
> よろしくお願いいたします。
>
こんな図を描いてみると,出題者が確率に対し持っているイメージが読み取れると思います。
DATA 月,0.6
DATA 火,0.6
DATA 水,0.6
DATA 木,0.6
DATA 金,0.6
DATA 土,0.8
DATA 日,0.8
DIM days$(7),p(7)
FOR i=1 TO 7
READ days$(i), p(i)
NEXT i
SET WINDOW -0.2,1,8,0
SET AREA STYLE "HOLLOW"
FOR i=1 TO 7
PLOT TEXT ,AT -0.1, i+0.7:days$(i)
PLOT AREA : 0,i; 1,i; 1,i+1; 0,i+1
NEXT i
SET AREA STYLE "HATCH"
SET AREA STYLE index 4
SET AREA COLOR 3
FOR i=1 TO 7
PLOT AREA : 0,i; p(i),i; p(i),i+1; 0,i+1
NEXT i
SET AREA STYLE index 3
SET AREA COLOR 4
PLOT AREA : 0,7; p(7),7; p(7),8; 0,8
END
> 『無限解析のはじまり』高瀬正仁:著 ちくま学芸文庫
> P328
> 3.34オイラーの公式の証明
>
> を眺めています。数式をプログラムにしてみました。
>
> OPTION ARITHMETIC RATIONAL
> LET format$="#." & REPEAT$("#",999)
> LET e=1
> LET f=1
> FOR i=1 TO 450
> LET f=f*i
> LET e=e+1/f ! 自然対数の底(ネピア数)1000桁
> NEXT i
> ! PRINT USING format$:e
>
> FOR r=3 TO 4
> LET n=10^r
> LET x=2
> LET x1=5
> LET m=(((1+x/n)^n)/(E^x))/(((1+x1/n)^n)/(E^x1))
> PRINT USING format$:m
> NEXT r
> END
>
> LET n=10^6 辺りから重いです。LET n=10^7 何日?
>
1000桁モードで実行すれば、r=18まで高速に計算できます。
OPTION ARITHMETIC DECIMAL_HIGH
DECLARE EXTERNAL FUNCTION EXP ! 外部関数宣言(必須)
LET x=2
LET x1=5
LET ex=EXP(x)
LET ex1=EXP(x1)
FOR r=3 TO 18
LET n=10^r
LET m=((1+x/n)^n/ex)/((1+x1/n)^n/ex1)
PRINT m
NEXT r
END
!
EXTERNAL FUNCTION EXP(x) ! EXP関数 (精度約1000桁 有理数モード不可)
OPTION ARITHMETIC DECIMAL_HIGH
DECLARE NUMERIC a,lim
FUNCTION ex(t,n) ! e^a テイラー展開
IF t>lim THEN LET ex=t+ex(t*a/n,n+1) ELSE LET ex=0
END FUNCTION
LET a=ABS(x) ! 定義域 a<=2321.0057737… (10進モード a<=227.9559…)
LET lim=EPS(2.71828^INT(a))*10^(-9) ! EPS(e^a)の9桁下まで計算し加算
IF x>=0 THEN LET EXP=ex(1,1) ELSE LET EXP=1/ex(1,1)
END FUNCTION
【おまけ】静岡理工科大学の菅沼義昇先生が公開しているガンマ関数の近似値を求めるプログラムをBASICに移植しました。ガンマ関数が階乗の拡張と言われる理由がわかります。
!/****************************/
!/* ガンマ関数の計算 */
!/* coded by Y.Suganuma */
!/****************************/
DECLARE FUNCTION gamma
DECLARE NUMERIC x,y
INPUT PROMPT "data?":x !-69.38<=x<56.905…(10進モード)
PRINT "x ="; x
LET y=gamma(x)
PRINT " Γ(x) ="; y
PRINT "x*Γ(x) ="; x*y
PRINT "Γ(x+1) ="; gamma(x+1)
!/****************************************/
!/* Γ(x)の計算(ガンマ関数,近似式) */
!/* ier : =0 : normal */
!/* =-1 : x=-n (n=0,1,2,・・・) */
!/* return : 結果 */
!/****************************************/
FUNCTION gamma(x)
LOCAL ier,err,g,s,t,v,w,y,k
LET ier=0
IF x>5 THEN
LET v=1/x
LET s=((((((-0.000592166437354*v+0.0000697281375837)*v+0.00078403922172)*v &
& -0.000229472093621)*v-0.00268132716049)*v+0.00347222222222)*v+0.0833333333333)*v+1
LET g=2.506628274631001*EXP(-x)*x^(x-0.5)*s
ELSE
LET err=1E-20
LET w=x
LET t=1
IF x<1.5 THEN
IF x<err THEN
LET k=INT(x)
LET y=k-x
IF ABS(y)<err OR ABS(1-y)<err THEN LET ier=-1
END IF
IF ier=0 THEN
DO WHILE w<1.5
LET t=t/w
LET w=w+1
LOOP
END IF
ELSE
IF w>2.5 THEN
DO WHILE w>2.5
LET w=w-1
LET t=t*w
LOOP
END IF
END IF
LET w=w-2
LET g=(((((((0.0021385778*w-0.0034961289)*w+0.0122995771)*w-0.00012513767)*w &
& +0.0740648982)*w+0.0815652323)*w+0.411849671)*w+0.422784604)*w+0.999999926
LET g=g*t
END IF
IF ier=-1 THEN PRINT "[ ier=";ier;"]"
LET gamma=g
END FUNCTION
END
OPTION ARITHMETIC RATIONAL
LET L=LEXP(1)
CALL DIV(L,2500)
PRINT
LET L=SQRT(2)
CALL DIV(L,5000)
PRINT
LET KETA=2000
LET L=183*ATAN(239,INT(KETA/4.75680340489133))+32*ATAN(1023,INT(KETA/6.01975126742432))-68*ATAN(5832,INT(KETA/7.53163503061984))+12*ATAN(110443,INT(KETA/10.0862763900263))-12*ATAN(4841182,INT(KETA/13.3699028197374))-100*ATAN(6826318,INT(KETA/13.6683730315326))
CALL DIV(4*L,KETA)
END
EXTERNAL FUNCTION LEXP(X)
OPTION ARITHMETIC RATIONAL
LET S=1
LET SIGN=1
IF X<0 THEN
LET SIGN=-1
LET X=ABS(X)
END IF
FOR I=1 TO 1000 !'1/1000!≒10^(-2500)
LET X=X/I*SIGN
LET S=S+X
NEXT I
LET LEXP=S
END FUNCTION
EXTERNAL FUNCTION SQRT(T)
OPTION ARITHMETIC RATIONAL
LET X=ABS(T)
FOR I=1 TO 13 !'12~13回程度
LET X=X-(X*X-T)/(2*X) !'ニュートン法
NEXT I
LET SQRT=X
END FUNCTION
EXTERNAL FUNCTION ATAN(X,NN) !'arctan(x)
OPTION ARITHMETIC RATIONAL
LET XX=1+X*X
LET S=1
LET A=1
FOR N=1 TO NN
LET A=A*(2*N)/(2*N+1)/XX
LET S=S+A
NEXT N
LET S=S*X/(1+X*X)
LET ATAN=S
END FUNCTION
EXTERNAL SUB DIV(S,KETA) !'有理数→小数
OPTION ARITHMETIC RATIONAL
LET M=5 !'遅い時は M=10にする
LET A=NUMER(S)
LET B=DENOM(S)
FOR I=0 TO INT(KETA/M)
LET Q=INT(A/B)
LET R=A-Q*B
LET A=R*10^M
IF I=0 THEN
PRINT Q;"."
ELSE
PRINT USING REPEAT$("%",M):Q;
IF MOD(I,100/M)<>0 AND (MOD(I,5/M)=0 OR MOD(I,10/M)=0) THEN PRINT " ";
IF MOD(I,100/M)<>0 AND MOD(I,50/M)=0 THEN PRINT " ";
IF MOD(I,100/M)=0 THEN PRINT ":";I*M
IF MOD(I,1000/M)=0 THEN PRINT
END IF
NEXT I
END SUB
WHEN EXCEPTION IN
LET X=SQR(-1)
LET S=1
USE
LET X$=STR$(MAXNUM)
IF X$="1.E99" THEN
LET S=2
ELSEIF X$="1.79769313486232E308" THEN
LET S=3
ELSEIF X$="1.E1008" THEN
LET S=4
END IF
END WHEN
SELECT CASE S
CASE 1
PRINT "複素数モード"
CASE 2
PRINT "10進モード"
CASE 3
PRINT "2進モード"
CASE 4
PRINT "1000桁モード"
END SELECT
END
----------------------------------------------------------------
LET Y$=STR$(1/3)
LET X$=STR$(1-1/3*3)
IF POS(Y$,"/")>0 THEN
LET S=1
ELSEIF POS(X$,"E")>0 THEN
LET S=2
ELSEIF LEN(Y$)<20 THEN
LET S=3
ELSEIF LEN(Y$)>=1000 THEN
LET S=4
END IF
SELECT CASE S
CASE 1
PRINT "有理数モード"
CASE 2
PRINT "10進モード"
CASE 3
PRINT "2進モード or 複素数モード"
CASE 4
PRINT "1000桁モード"
END SELECT
END
!OPTION ARITHMETIC DECIMAL_HIGH !RATIONAL !COMPLEX
DECLARE FUNCTION ARITHMETIC
PRINT ARITHMETIC
!
FUNCTION ARITHMETIC ! 数値モード判別関数
! OPTION ARITHMETIC文を書かない1000桁モード,有理数モードでは、
! [オプション]→[数値]→[超越関数を使う]にチェックを入れる。
LOCAL a,b
SELECT CASE LEN(STR$(1/3))
CASE 3
LET ARITHMETIC=1/2 ! 有理数モード
CASE IS >200
LET ARITHMETIC=1000 ! 1000桁モード
CASE ELSE
LET a=1E-200
IF a=0 THEN
LET ARITHMETIC=10 ! 10進モード
ELSE
WHEN EXCEPTION IN
LET b=LOG(-1)
LET ARITHMETIC=-1 ! 複素数モード
USE
LET ARITHMETIC=2 ! 2進モード
END WHEN
END IF
END SELECT
END FUNCTION
END
!SQR(zeta(x))
OPTION ARITHMETIC DECIMAL_HIGH !1000桁モード
LET a=PI^20*174611/1531329465290625 !' PI^18*43867/38979295480125 PI^2/6 PI^4/90 PI^6/945 PI^8/9450 PI^10/93555 691*PI^12/638512875 2*PI^14/18243225 !'PI^2/6 PI^16*3617/325641566250
DO
LET s=SQR(a)
LET a=SQR(s)
LET n=n+1
PRINT n,s
LOOP UNTIL s=1
END
十進BASIC 有理数モード
!ゼータ関数の特殊値 SELECT CASE mod(x,4)=2 or mod(x,4)=0
OPTION ARITHMETIC RATIONAL !有理数モード
FOR n=2 TO 100 STEP 2
LET z1=2^(n-1)
LET z2=ABS(BERNOULLI(n))
LET z3=FACT(n)
LET z4=z1*z2/z3
PRINT "zeta(";STR$(n) &")";"= ";"PI^";STR$(n) &"*";STR$(z4)
NEXT n
END
EXTERNAL FUNCTION BERNOULLI(n) !'ベルヌーイ定数
OPTION ARITHMETIC RATIONAL !有理数モード
DIM b(0 TO n)
LET b(0)=1
IF n=0 THEN LET BERNOULLI=1
FOR k=2 TO n+1
LET s=0
FOR i=0 TO k-2
LET s=s+comb(k,i)*b(i)
NEXT i
LET b(k-1)=- s / k
LET BERNOULLI=b(k-1)
NEXT k
END FUNCTION
!'二重ゼータ関数
OPTION BASE 0
LET KMAX=100000
DIM SS(KMAX)
INPUT A,B !' A>=2
FOR N=1 TO KMAX
LET SS(N)=SS(N-1)+1/N^B
NEXT N
FOR N=2 TO KMAX
LET S=S+1/N^A*SS(N-1)
NEXT N
PRINT S
END
------------------------------------------------------
!'三重ゼータ関数
OPTION BASE 0
LET KMAX=100000
DIM SSS(KMAX),SS(KMAX)
INPUT A,B,C !' A>=2
FOR N=1 TO KMAX
LET SSS(N)=SSS(N-1)+1/N^C
NEXT N
FOR N=1 TO KMAX
LET SS(N)=SS(N-1)+1/N^B*SSS(N-1)
NEXT N
FOR N=2 TO KMAX
LET S=S+1/N^A*SS(N-1)
NEXT N
PRINT S
END
------------------------------------------------------
!'四重ゼータ関数
OPTION BASE 0
LET KMAX=100000
DIM SSSS(KMAX),SSS(KMAX),SS(KMAX)
INPUT A,B,C,D !' A>=2
FOR N=1 TO KMAX
LET SSSS(N)=SSSS(N-1)+1/N^D
NEXT N
FOR N=1 TO KMAX
LET SSS(N)=SSS(N-1)+1/N^C*SSSS(N-1)
NEXT N
FOR N=1 TO KMAX
LET SS(N)=SS(N-1)+1/N^B*SSS(N-1)
NEXT N
FOR N=2 TO KMAX
LET S=S+1/N^A*SS(N-1)
NEXT N
PRINT S
END
------------------------------------------------------
!'多重ゼータ関数
OPTION BASE 0
INPUT PROMPT "N=":N
LET KMAX=100000
DIM S(N,KMAX),A(N)
FOR I=1 TO N
INPUT PROMPT CHR$(64+I)&"=":A(I) !'A(1)>=2
NEXT I
FOR I=N TO 1 STEP -1
FOR J=1 TO KMAX
IF I<N THEN
LET S(I,J)=S(I,J-1)+1/J^A(I)*S(I+1,J-1)
ELSE
LET S(I,J)=S(I,J-1)+1/J^A(N)
END IF
NEXT J
NEXT I
PRINT S(1,KMAX)
END
!DATA書き出し用
OPTION ARITHMETIC DECIMAL_HIGH !1000桁モード
OPTION BASE 0 !ゼロベース
LET t0=TIME
LET M=3319
DIM C(M)
LET C(0)=1
for K=1 to M
FOR J=K TO 1 STEP -1
LET C(J)=(C(J)+C(J-1))/2
NEXT j
NEXT k
OPEN #1:NAME "cf_3319.txt",RECTYPE INTERNAL
ERASE #1
for J=1 to M
WRITE #1:C(J)
NEXT j
CLOSE #1
PRINT TIME-t0;"秒で計算しました"
END
-------------------------------------
!OPTION ARITHMETIC RATIONAL !有理数モード
OPTION ARITHMETIC DECIMAL_HIGH !1000桁モード
OPTION BASE 0 !ゼロベース
LET t0=TIME
LET M=3319
DIM C(M)
LET C(0)=1
OPEN #1:NAME "cf_3319.txt",ACCESS INPUT
for K=1 to M
INPUT #1: C(k)
NEXT k
CLOSE #1
FOR x=2 TO 285
LET U=0
for J=1 to M
LET U=U+((-1)^INT(J-1))*C(J)/J^X
IF C(J)<1E-1000 THEN EXIT FOR
NEXT j
LET zeta=U/(1-2^(1-X))
PRINT USING"#." & REPEAT$("#",999):zeta
NEXT x
LET TM=TIME-t0
PRINT USING"####." & REPEAT$("#",2):TM;
PRINT "秒"
END
----------------------------------------
FOR x=2 TO 285 ゼータ関数1000桁 zeta(2)~zeta(285) 以上1000桁モードでは数値溢れ
1000桁モードの末尾の精度、有理数モードとの比較では不一致
有理数モードでは精度はいいですが遅いです。
programの目的は下記の画像のDATA
LET M=3319 の根拠は、1000桁精度のゼータ関数 zeta(3318)から1
3319/2=1659.5
OPTION ARITHMETIC DECIMAL_HIGH
LET S=0
LET SIGN=1
FOR K=1 TO 2000
LET A=COMB(2*K,K)
LET SS=S+1/A/K/K/K*SIGN
LET SIGN=-SIGN
IF S=SS THEN EXIT FOR
LET S=SS
NEXT K
PRINT S*5/2
END
zeta(5)について
OPTION ARITHMETIC DECIMAL_HIGH
LET A=1
LET AA=1
FOR I=0 TO 1000
LET B=126976/(24*I+1)^5-6610944/(24*I+2)^5+33418240/(24*I+3)^5-12722176/(24*I+4)^5-31744/(24*I+5)^5+25829376/(24*I+6)^5+15872/(24*I+7)^5+38170624/(24*I+8)^5-4177280/(24*I+9)^5
LET B=B-413184/(24*I+10)^5-3968/(24*I+11)^5-6323008/(24*I+12)^5-1984/(24*I+13)^5-103296/(24*I+14)^5-522160/(24*I+15)^5+2385664/(24*I+16)^5+496/(24*I+17)^5+403584/(24*I+18)^5-248/(24*I+19)^5
LET B=B-49696/(24*I+20)^5+65270/(24*I+21)^5-6456/(24*I+22)^5+62/(24*I+23)^5+128125/(24*I+24)^5
LET C=-128/(4*I+1)^5+4/(4*I+3)^5+1/(4*I+4)^5
IF I>0 THEN
LET A=A/4096
LET AA=-AA/1024
END IF
LET S=S+A*B
LET SS=SS+AA*C
NEXT I
PRINT 9/250604*S+369/62651*SS
END
!k=pn 新しい素数判定
DIM a(528)
PRINT 2
FOR n= 2 TO 4
LET p=+MOD(N,2)/2
LET a(n)=p
NEXT n
FOR n= 5 TO 48
LET p=+MOD(N,2)/2+MOD(N,3)/3-MOD(N,6)/6+MOD(N,5)/5-MOD(N,10)/10-MOD(N,15)/15+MOD(N,30)/30+2
LET a(n)=p
NEXT n
FOR n= 47 TO 528 !k=8
LET P=+MOD(N,2)/2+MOD(N,3)/3-MOD(N,6)/6+MOD(N,5)/5-MOD(N,10)/10-MOD(N,15)/15+MOD(N,30)/30+MOD(N,7)/7-MOD(N,14)/14-MOD(N,21)/21+MOD(N,42)/42-MOD(N,35)/35+MOD(N,70)/70+MOD(N,105)/105-MOD(N,210)/210+MOD(N,11)/11-MOD(N,22)/22-MOD(N,33)/33+MOD(N,66)/66-MOD(N,55)/55+MOD(N,110)/110+MOD(N,165)/165-MOD(N,330)/330-MOD(N,77)/77+MOD(N,154)/154+MOD(N,231)/231-MOD(N,462)/462+MOD(N,385)/385-MOD(N,770)/770-MOD(N,1155)/1155+MOD(N,2310)/2310+MOD(N,13)/13-MOD(N,26)/26-MOD(N,39)/39+MOD(N,78)/78-MOD(N,65)/65+MOD(N,130)/130+MOD(N,195)/195-MOD(N,390)/390-MOD(N,91)/91+MOD(N,182)/182+MOD(N,273)/273-MOD(N,546)/546+MOD(N,455)/455-MOD(N,910)/910-MOD(N,1365)/1365+MOD(N,2730)/2730-MOD(N,143)/143+MOD(N,286)/286+MOD(N,429)/429-MOD(N,858)/858+MOD(N,715)/715-MOD(N,1430)/1430-MOD(N,2145)/2145+MOD(N,4290)/4290+MOD(N,1001)/1001-MOD(N,2002)/2002-MOD(N,3003)/3003+MOD(N,6006)/6006-MOD(N,5005)/5005+MOD(N,10010)/10010+MOD(N,15015)/15015-MOD(N,30030)/30030+MOD(N,17)/17-MOD(N,34)/34-MOD(N,51)/51+MOD(N,102)/102-MOD(N,85)/85+MOD(N,170)/170+MOD(N,255)/255-MOD(N,510)/510-MOD(N,119)/119+MOD(N,238)/238+MOD(N,357)/357
LET P=P-MOD(N,714)/714+MOD(N,595)/595-MOD(N,1190)/1190-MOD(N,1785)/1785+MOD(N,3570)/3570-MOD(N,187)/187+MOD(N,374)/374+MOD(N,561)/561-MOD(N,1122)/1122+MOD(N,935)/935-MOD(N,1870)/1870-MOD(N,2805)/2805+MOD(N,5610)/5610+MOD(N,1309)/1309-MOD(N,2618)/2618-MOD(N,3927)/3927+MOD(N,7854)/7854-MOD(N,6545)/6545+MOD(N,13090)/13090+MOD(N,19635)/19635-MOD(N,39270)/39270-MOD(N,221)/221+MOD(N,442)/442+MOD(N,663)/663-MOD(N,1326)/1326+MOD(N,1105)/1105-MOD(N,2210)/2210-MOD(N,3315)/3315+MOD(N,6630)/6630+MOD(N,1547)/1547-MOD(N,3094)/3094-MOD(N,4641)/4641+MOD(N,9282)/9282-MOD(N,7735)/7735+MOD(N,15470)/15470+MOD(N,23205)/23205-MOD(N,46410)/46410+MOD(N,2431)/2431-MOD(N,4862)/4862-MOD(N,7293)/7293+MOD(N,14586)/14586-MOD(N,12155)/12155+MOD(N,24310)/24310+MOD(N,36465)/36465-MOD(N,72930)/72930-MOD(N,17017)/17017+MOD(N,34034)/34034+MOD(N,51051)/51051-MOD(N,102102)/102102+MOD(N,85085)/85085-MOD(N,170170)/170170-MOD(N,255255)/255255+MOD(N,510510)/510510+MOD(N,19)/19-MOD(N,38)/38-MOD(N,57)/57+MOD(N,114)/114-MOD(N,95)/95+MOD(N,190)/190+MOD(N,285)/285-MOD(N,570)/570-MOD(N,133)/133+MOD(N,266)/266
LET P=P+MOD(N,399)/399-MOD(N,798)/798+MOD(N,665)/665-MOD(N,1330)/1330-MOD(N,1995)/1995+MOD(N,3990)/3990-MOD(N,209)/209+MOD(N,418)/418+MOD(N,627)/627-MOD(N,1254)/1254+MOD(N,1045)/1045-MOD(N,2090)/2090-MOD(N,3135)/3135+MOD(N,6270)/6270+MOD(N,1463)/1463-MOD(N,2926)/2926-MOD(N,4389)/4389+MOD(N,8778)/8778-MOD(N,7315)/7315+MOD(N,14630)/14630+MOD(N,21945)/21945-MOD(N,43890)/43890-MOD(N,247)/247+MOD(N,494)/494+MOD(N,741)/741-MOD(N,1482)/1482+MOD(N,1235)/1235-MOD(N,2470)/2470-MOD(N,3705)/3705+MOD(N,7410)/7410+MOD(N,1729)/1729-MOD(N,3458)/3458-MOD(N,5187)/5187+MOD(N,10374)/10374-MOD(N,8645)/8645+MOD(N,17290)/17290+MOD(N,25935)/25935-MOD(N,51870)/51870+MOD(N,2717)/2717-MOD(N,5434)/5434-MOD(N,8151)/8151+MOD(N,16302)/16302-MOD(N,13585)/13585+MOD(N,27170)/27170+MOD(N,40755)/40755-MOD(N,81510)/81510-MOD(N,19019)/19019+MOD(N,38038)/38038+MOD(N,57057)/57057-MOD(N,114114)/114114+MOD(N,95095)/95095-MOD(N,190190)/190190-MOD(N,285285)/285285+MOD(N,570570)/570570-MOD(N,323)/323+MOD(N,646)/646+MOD(N,969)/969-MOD(N,1938)/1938+MOD(N,1615)/1615-MOD(N,3230)/3230-MOD(N,4845)/4845+MOD(N,9690)/9690
LET P=P+MOD(N,2261)/2261-MOD(N,4522)/4522-MOD(N,6783)/6783+MOD(N,13566)/13566-MOD(N,11305)/11305+MOD(N,22610)/22610+MOD(N,33915)/33915-MOD(N,67830)/67830+MOD(N,3553)/3553-MOD(N,7106)/7106-MOD(N,10659)/10659+MOD(N,21318)/21318-MOD(N,17765)/17765+MOD(N,35530)/35530+MOD(N,53295)/53295-MOD(N,106590)/106590-MOD(N,24871)/24871+MOD(N,49742)/49742+MOD(N,74613)/74613-MOD(N,149226)/149226+MOD(N,124355)/124355-MOD(N,248710)/248710-MOD(N,373065)/373065+MOD(N,746130)/746130+MOD(N,4199)/4199-MOD(N,8398)/8398-MOD(N,12597)/12597+MOD(N,25194)/25194-MOD(N,20995)/20995+MOD(N,41990)/41990+MOD(N,62985)/62985-MOD(N,125970)/125970-MOD(N,29393)/29393+MOD(N,58786)/58786+MOD(N,88179)/88179-MOD(N,176358)/176358+MOD(N,146965)/146965-MOD(N,293930)/293930-MOD(N,440895)/440895+MOD(N,881790)/881790-MOD(N,46189)/46189+MOD(N,92378)/92378+MOD(N,138567)/138567-MOD(N,277134)/277134+MOD(N,230945)/230945-MOD(N,461890)/461890-MOD(N,692835)/692835+MOD(N,1385670)/1385670+MOD(N,323323)/323323-MOD(N,646646)/646646-MOD(N,969969)/969969+MOD(N,1939938)/1939938-MOD(N,1616615)/1616615+MOD(N,3233230)/3233230
LET P=P+MOD(N,4849845)/4849845-MOD(N,9699690)/9699690+7
LET a(n)=p
NEXT n
FOR n= 2 TO 528-1
LET FF=a(n+1)-a(n)
IF FF > 0 THEN PRINT n+1;":";ff
NEXT n
!有理数 (素数-1階乗)/素数階乗
DECLARE EXTERNAL FUNCTION ISPRIME
DECLARE EXTERNAL FUNCTION POWMOD
OPTION ARITHMETIC RATIONAL !有理数モード
LET t0=TIME
LET W=1E9
SET WINDOW 9,1400,-w,w !-x,+x,-y,+y
DRAW grid(100,1E8)
LET k9=11
!エラトステネスの奇数列篩
LET k7=100
DIM P(k7)
DIM A(k7)
LET h1=1
LET A(h1)=2
LET h1=2
FOR n1=3 TO k7 STEP 2
IF P(n1)=0 THEN
LET A(h1)=n1
LET h1=h1+1
END IF
FOR k1=n1 TO k7 STEP 2
LET m1=n1*k1
IF m1>k7 THEN GOTO 10
LET P(m1)=1
NEXT k1
10 NEXT n1
LET X=1 !分子
LET Y=1 !分母
FOR i=1 TO K9
LET X=X*(A(i)-1) !1,2,4,6,10,12,16,18,…
LET Y=Y*A(i) !2,3,5,7,11,13,17,19,…
!PRINT i;x/y
NEXT i
LET START=A(k9) !(6th prime)
LET STOPT=A(k9+1)^2-1
LET SERIES=x/y
LET x1=NUMER(SERIES) !NUMER(x) xの分子(numerator)
LET y1=DENOM(SERIES) !DENOM(x) xの分母(denominator)
LET z=(k9-(START*x1/y1+k9-1))*y1
LET g=y1-x1
LET R=STOPT-START+1 !DATAの個数
DIM K(R)
LET S=z !DATA初項
LET K(1)=S
LET R=2
FOR N=START+1 TO STOPT STEP 1
IF ISPRIME(N)=1 THEN
LET S=S-(-g)
LET K(R)=S
LET R=R+1
LET count=count+1
ELSE
LET S=S+(-x1)
LET K(R)=S
LET R=R+1
END IF
NEXT N
LET R=1
FOR N=START TO STOPT
LET pn=(n*x1+K(R))/y1
PRINT n;":";pn+k9-1;":";K(R)
!PRINT n;K(R)
SET POINT STYLE 6
SET POINT COLOR 2
PLOT POINTS:n,(pn+k9-1)*3E6
SET POINT STYLE 7
SET POINT COLOR 4
PLOT POINTS:n,K(R)
LET R=R+1
NEXT n
PRINT "primenumber count=";count
PRINT "-x1=";-x1
PRINT "-g=";-g
PRINT TIME-t0;"秒で計算しました"
END
EXTERNAL FUNCTION ISPRIME(N)
OPTION ARITHMETIC RATIONAL
IF N=2 OR N=3 OR N=5 OR N=7 OR N=11 OR N=13 OR N=17 THEN
LET ISPRIME=1
EXIT FUNCTION
END IF
IF N=1 OR MOD(N,2)=0 THEN
LET ISPRIME=0
EXIT FUNCTION
END IF
LET D=(N-1)/2
LET S=0
DO WHILE MOD(D, 2)=0
LET D=INT(D/2)
LET S=S+1
LOOP
FOR I=1 TO 7
LET ISP=0
READ A !' n < 341550071728321 なら a=2,3,5,7,11,13,17
DATA 2,3,5,7,11,13,17
LET ISP=0
LET R=POWMOD(A,D,N)
IF R=1 OR R=N-1 THEN
LET ISP=1
END IF
LET R=POWMOD(R,2,N)
FOR J=0 TO S-1
IF R=N-1 THEN
LET ISP=1
END IF
LET R=POWMOD(R,2,N)
NEXT J
IF ISP=0 THEN
LET ISPRIME=0
EXIT FUNCTION
END IF
NEXT I
LET ISPRIME=1
END FUNCTION
EXTERNAL FUNCTION POWMOD(B,P,M)
OPTION ARITHMETIC RATIONAL
LET RESULT=1
DO WHILE P>0
IF MOD(P,2)=1 THEN
LET RESULT=MOD(RESULT*B,M)
END IF
LET B=MOD(B*B,M)
LET P=INT(P/2)
LOOP
LET POWMOD=RESULT
END FUNCTION
> 山中氏のプログラムを少しいじってみました。
>
>
> OPTION ARITHMETIC RATIONAL
> DIM P(25)
> MAT READ P
> DATA 2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97
> PRINT "SELECT CASE N"
> FOR K=1 TO 10
> IF K=1 THEN
> PRINT "CASE 2 TO 8"
> ELSE
> PRINT "CASE";P(K)^2;"TO";P(K+1)^2-1
> END IF
> LET X=1
> LET Y=1
> FOR I=1 TO K
> LET X=X*(P(I)-1)
> LET Y=Y*P(I)
> NEXT I
> PRINT "P=N*";STR$(X/Y);
> LET L=0
> FOR J=1 TO 2^K-1
> LET T=J
> LET S=1
> LET B=-1
> FOR I=1 TO K
> IF MOD(T,2)=1 THEN
> LET S=S*P(I)
> LET B=-B
> END IF
> LET T=INT(T/2)
> NEXT I
> IF B<0 THEN PRINT "-"; ELSE PRINT "+";
> LET S$="MOD(N,"&STR$(S)&")/"&STR$(S)
> PRINT S$;
> LET L=L+LEN(S$)
> IF L>1000 THEN
> LET L=0
> PRINT
> PRINT "P=P";
> END IF
> NEXT J
> IF K>1 THEN PRINT "+";STR$(K-1) ELSE PRINT
> NEXT K
> PRINT "CASE ELSE"
> PRINT "P=0"
> PRINT "END SELECT"
> END
>
LET k=5
LET kk=1E4
DIM P(25)
MAT READ P
DATA 2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97
DIM D(kk)
MAT D=ZER
DIM E(kk)
MAT E=ZER
FOR J=1 TO 2^K-1
LET T=J
LET S=1
LET B=-1
FOR I=1 TO K
IF MOD(T,2)=1 THEN
LET S=S*P(I)
LET B=-B
END IF
LET T=INT(T/2)
LET D(s)=s
LET E(s)=B
NEXT I
NEXT J
LET D(1)=0
FOR dd=1 TO D(s)
IF D(dd)><0 THEN PRINT E(dd);"*";dd
NEXT dd
END
!新しい素数判定
OPTION ARITHMETIC RATIONAL !有理数モード
PRINT "k=1"
LET count=2
LET f=2
FOR n=2 TO 3^2-1
LET z=n/f
!PRINT n;":";z
IF n=NUMER(z) THEN
PRINT count;":";n
LET count=count+1
END IF
NEXT n
PRINT
PRINT "k=2"
LET count=3
LET f=2*3*6
FOR n=3 TO 5^2-1
LET z=n/f
!PRINT n;":";z
IF n=NUMER(z) THEN
PRINT count;":";n
LET count=count+1
END IF
NEXT n
PRINT
PRINT "k=3"
LET count=4
LET f=2*3*5*6*10*15*30
FOR n=5 TO 7^2-1
LET z=n/f
!PRINT n;":";z
IF n=NUMER(z) THEN
PRINT count;":";n
LET count=count+1
END IF
NEXT n
PRINT
PRINT "k=4"
LET count=5
LET f=2*3*5*6*7*10*14*15*21*30*35*42*70*105*210
FOR n=7 TO 11^2-1
LET z=n/f
!PRINT n;":";z
IF n=NUMER(z) THEN
PRINT count;":";n
LET count=count+1
END IF
NEXT n
PRINT
PRINT "k=5"
LET count=6
LET f=2*3*5*6*7*10*11*14*15*21*22*30*33*35*42*55*66*70*77*105*110*154*165*210*231*330*385*462*770*1155*2310
FOR n=11 TO 13^2-1
LET z=n/f
!PRINT n;":";z
IF n=NUMER(z) THEN
PRINT count;":";n
LET count=count+1
END IF
NEXT n
END
------------------------------------
LET k=7
LET kk=1E6
PRINT "k=";k
DIM P(25)
MAT READ P
DATA 2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97
DIM D(kk)
MAT D=ZER
FOR J=1 TO 2^K-1
LET T=J
LET S=1
LET B=-1
FOR I=1 TO K
IF MOD(T,2)=1 THEN
LET S=S*P(I)
LET B=-B
END IF
LET T=INT(T/2)
LET D(s)=s
NEXT I
NEXT J
LET D(1)=0
LET FF=1
FOR dd=1 TO D(s)
IF D(dd)><0 THEN LET FF=FF*dd
NEXT dd
LET count=k+1
FOR n=P(k) TO P(k+1)^2-1
LET z=n/ff
!PRINT n;":";z
IF n=NUMER(z) THEN
PRINT count;":";n
LET count=count+1
END IF
NEXT n
!階乗でも、できる素数判定
OPTION ARITHMETIC RATIONAL !有理数モード
LET z=1
LET m=1
LET count=0
FOR n=1 TO 1000
LET m=n*m
LET e=1/m
LET r=e+b
LET b=e
IF NUMER(r)<>1 THEN
LET count=count+1
PRINT count;":";NUMER(r)
END IF
NEXT n
> !山中氏のプログラムを少しいじってみました。
> PRINT "少しいじってみました。"
>
> LET k=5
> LET kk=1E4
> DIM P(25)
> MAT READ P
> DATA 2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97
>
> DIM D(kk)
> MAT D=ZER
>
> DIM E(kk)
> MAT E=ZER
>
> FOR J=1 TO 2^K-1
> LET T=J
> LET S=1
> LET B=-1
> FOR I=1 TO K
> IF MOD(T,2)=1 THEN
> LET S=S*P(I)
> LET B=-B
> END IF
> LET T=INT(T/2)
> LET D(s)=s
> LET E(s)=B
> NEXT I
> NEXT J
>
> LET D(1)=0
> FOR dd=1 TO D(s)
> IF D(dd)><0 THEN PRINT E(dd);"*";dd
> NEXT dd
> END
>
>
> 二進モードでK=8 やっとです。よろしくお願いします。
LET K=13
LET KK=2^K
DIM P(K)
MAT READ P
DATA 2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97
DIM D(0 TO KK),E(0 TO KK)
FOR J=1 TO 2^K-1
LET T=J
LET S=1
LET B=-1
FOR I=1 TO K
IF MOD(T,2)=1 THEN
LET S=S*P(I)
LET B=-B
END IF
LET T=INT(T/2)
LET FL=0
FOR L=0 TO N
IF D(L)=S AND E(L)=B THEN
LET FL=1
EXIT FOR
END IF
NEXT L
IF FL=0 THEN
LET N=N+1
LET D(N)=S
LET E(N)=B
END IF
NEXT I
NEXT J
CALL QUICKSORT(1,N,D,E)
FOR DD=2 TO N
PRINT E(DD);"*";D(DD)
NEXT DD
END
EXTERNAL SUB QUICKSORT(FI,LA,D(),E())
LET X=D((FI+LA)/2)
LET I=FI
LET J=LA
DO
DO WHILE D(I)<X
LET I=I+1
LOOP
DO WHILE X<D(J)
LET J=J-1
LOOP
IF I>=J THEN EXIT DO
SWAP D(I),D(J)
SWAP E(I),E(J)
LET I=I+1
LET J=J-1
LOOP
IF FI<I-1 THEN CALL QUICKSORT(FI,I-1,D,E)
IF J+1<LA THEN CALL QUICKSORT(J+1,LA,D,E)
END SUB
--------------------------------------------
OPTION ARITHMETIC NATIVE !2進モード
LET t0=TIME
LET K=13
LET KK=2^K
DIM P(K)
MAT READ P
DATA 2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97
DIM D(0 TO KK),E(0 TO KK)
FOR J=1 TO 2^K-1
LET T=J
LET S=1
LET B=-1
FOR I=1 TO K
IF MOD(T,2)=1 THEN
LET S=S*P(I)
LET B=-B
END IF
LET T=INT(T/2)
LET FL=0
FOR L=0 TO N
IF D(L)=S AND E(L)=B THEN
LET FL=1
EXIT FOR
END IF
NEXT L
IF FL=0 THEN
LET N=N+1
LET D(N)=S
LET E(N)=B
END IF
NEXT I
NEXT J
CALL QUICKSORT(1,N,D,E)
!書き出し
OPEN #1:NAME "E:\prime_k_13.txt",RECTYPE INTERNAL
ERASE #1
FOR DD=2 TO N
! PRINT E(DD);"*";D(DD)
WRITE #1:D(DD)
NEXT DD
CLOSE #1
PRINT TIME-t0;"秒で計算しました"
END
EXTERNAL SUB QUICKSORT(FI,LA,D(),E())
LET X=D((FI+LA)/2)
LET I=FI
LET J=LA
DO
DO WHILE D(I)<X
LET I=I+1
LOOP
DO WHILE X<D(J)
LET J=J-1
LOOP
IF I>=J THEN EXIT DO
SWAP D(I),D(J)
SWAP E(I),E(J)
LET I=I+1
LET J=J-1
LOOP
IF FI<I-1 THEN CALL QUICKSORT(FI,I-1,D,E)
IF J+1<LA THEN CALL QUICKSORT(J+1,LA,D,E)
END SUB
-------------------------------------------
!新しい?素数判定
OPTION ARITHMETIC RATIONAL !有理数モード
LET k=13 !DATA読み込み
LET k9=8191 !DATAの数
DIM A(k9)
OPEN #2:NAME "E:\prime_k_13.txt",ACCESS INPUT
FOR i=1 TO k9
INPUT #2: A(i)
NEXT i
CLOSE #2
LET f=1
FOR n=1 TO k9
LET f=f*A(n)
NEXT n
DIM P(k+1)
MAT READ P
DATA 2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97
PRINT "k=";STR$(k)&":(";STR$(P(k))&")(";STR$(k)&"th prime)"
LET count=14
FOR n=P(k) TO P(k+1)^2-1
LET z=n/f
!PRINT n;":";z
IF n=NUMER(z) THEN
PRINT count;":";n
LET count=count+1
END IF
NEXT n
END
OPTION CHARACTER BYTE
OPEN #1:NAME "COM1:38400,n,8,1"
PRINT #1:CHR$(BVAL("FF",16));CHR$(BVAL("FF",16));CHR$(BVAL("92",16));CHR$(BVAL("00",16));CHR$(BVAL("C0",16));CHR$(BVAL("00",16));
DIM A$(8)
FOR I=1 TO 8
READ A$(I)
NEXT I
DATA "***** ** **** **** *** "
DATA "** ** * ** ** * ** * ** "
DATA "** ** * ** ** ** ** "
DATA "***** * ** **** ** ** "
DATA "** ** ****** ** ** ** "
DATA "** ** * ** * ** ** * ** "
DATA "***** * ** **** **** *** "
DATA " "
FOR I=1 TO 48
LET X=0
FOR J=1 TO 8
IF A$(J)(I:I)<>" " THEN LET BIT=1 ELSE LET BIT=0
LET X=X+BIT*2^(J-1)
NEXT J
PRINT I;":";X
!' PRINT I;":";BSTR$(X,16)
NEXT I
END
>
> LET K=13
> LET KK=2^K
> DIM P(K)
> MAT READ P
> DATA 2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97
> DIM D(0 TO KK),E(0 TO KK)
> FOR J=1 TO 2^K-1
> LET T=J
> LET S=1
> LET B=-1
> FOR I=1 TO K
> IF MOD(T,2)=1 THEN
> LET S=S*P(I)
> LET B=-B
> END IF
> LET T=INT(T/2)
> LET FL=0
> FOR L=0 TO N
> IF D(L)=S AND E(L)=B THEN
> LET FL=1
> EXIT FOR
> END IF
> NEXT L
> IF FL=0 THEN
> LET N=N+1
> LET D(N)=S
> LET E(N)=B
> END IF
> NEXT I
> NEXT J
> CALL QUICKSORT(1,N,D,E)
> FOR DD=2 TO N
> PRINT E(DD);"*";D(DD)
> NEXT DD
> END
>
> EXTERNAL SUB QUICKSORT(FI,LA,D(),E())
> LET X=D((FI+LA)/2)
> LET I=FI
> LET J=LA
> DO
> DO WHILE D(I)<X
> LET I=I+1
> LOOP
> DO WHILE X<D(J)
> LET J=J-1
> LOOP
> IF I>=J THEN EXIT DO
> SWAP D(I),D(J)
> SWAP E(I),E(J)
> LET I=I+1
> LET J=J-1
> LOOP
> IF FI<I-1 THEN CALL QUICKSORT(FI,I-1,D,E)
> IF J+1<LA THEN CALL QUICKSORT(J+1,LA,D,E)
> END SUB
>
計算結果のDATAを探究しましたのでご報告いたします。
出力されたDATAを眺めていたら、Σ1/DATA 試しました。
OPTION ARITHMETIC NATIVE !2進モード
OPEN #1:NAME "preDATA_1.txt",RECTYPE INTERNAL
ERASE #1
OPEN #2:NAME "preDATA_2.txt",RECTYPE INTERNAL
ERASE #2
LET K=13
LET KK=2^K
DIM P(K)
MAT READ P
DATA 2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97
DIM D(0 TO KK),E(0 TO KK)
FOR J=1 TO 2^K-1
LET T=J
LET S=1
LET B=-1
FOR I=1 TO K
IF MOD(T,2)=1 THEN
LET S=S*P(I)
LET B=-B
END IF
LET T=INT(T/2)
LET FL=0
FOR L=0 TO N
IF D(L)=S AND E(L)=B THEN
LET FL=1
EXIT FOR
END IF
NEXT L
IF FL=0 THEN
LET N=N+1
LET D(N)=S
LET E(N)=B
END IF
NEXT I
NEXT J
CALL QUICKSORT(1,N,D,E)
FOR DD=2 TO N
WRITE #1:E(DD)
WRITE #2:D(DD)
!PRINT E(DD);"*";D(DD)
NEXT DD
CLOSE #1
CLOSE #2
END
EXTERNAL SUB QUICKSORT(FI,LA,D(),E())
OPTION ARITHMETIC NATIVE
LET X=D((FI+LA)/2)
LET I=FI
LET J=LA
DO
DO WHILE D(I)<X
LET I=I+1
LOOP
DO WHILE X<D(J)
LET J=J-1
LOOP
IF I>=J THEN EXIT DO
SWAP D(I),D(J)
SWAP E(I),E(J)
LET I=I+1
LET J=J-1
LOOP
IF FI<I-1 THEN CALL QUICKSORT(FI,I-1,D,E)
IF J+1<LA THEN CALL QUICKSORT(J+1,LA,D,E)
END SUB
----------------------------------------------
OPTION ARITHMETIC RATIONAL !有理数モード
LET k9=8191 !DATAの数
DIM A(k9)
DIM B(k9)
OPEN #1:NAME "preDATA_1.txt",ACCESS INPUT
OPEN #2:NAME "preDATA_2.txt",ACCESS INPUT
FOR i=1 TO k9
INPUT #1: A(i)
INPUT #2: B(i)
NEXT i
FOR n=1 TO k9
LET z=z+a(n)/b(n)
PRINT n;":";z
NEXT n
PRINT USING"#." & REPEAT$("#",999):z
CLOSE #1
CLOSE #2
! 初期値
LET a = 2
LET s = a
!PRINT USING "####":0;
PRINT STR$(s)&"/1"
! 繰り返し
FOR i = 1 TO iter
LET a = a * i / (2 * i + 1)
PRINT a
!PRINT "DATA";NUMER(a) !xの分子(numerator)
!PRINT "DATA";DENOM(a) !xの分母(denominator)
LET s = s + a
!PRINT USING "####":i;
! PRINT s
NEXT i
PRINT s
!PRINT PI
END
-------------------------------------------------
OPTION ARITHMETIC RATIONAL
!OPTION ARITHMETIC DECIMAL_HIGH
!sum [a(n)/b(m)]=PI
LET k=500 !225(1000桁モード)
DIM a(0 TO k-1) !分子
MAT READ a !A079559 http://oeis.org/A079559
DATA 1,1,0,1,1,0,0,1,1,0,1,1,0,0,0,1,1,0,1,1,0,0,1,1,0,1,1,0,0,0,&
&0,1,1,0,1,1,0,0,1,1,0,1,1,0,0,0,1,1,0,1,1,0,0,1,1,0,1,1,0,0,&
&0,0,0,1,1,0,1,1,0,0,1,1,0,1,1,0,0,0,1,1,0,1,1,0,0,1,1,0,1,1,&
&0,0,0,0,1,1,0,1,1,0,0,1,1,0,1,1,0,0,0,1,1,0,1,1,0,0,1,1,0,1,&
&1,0,0,0,0,0,0,1,1,0,1,1,0,0,1,1,0,1,1,0,0,0,1,1,0,1,1,0,0,1,&
&1,0,1,1,0,0,0,0,1,1,0,1,1,0,0,1,1,0,1,1,0,0,0,1,1,0,1,1,0,0,&
&1,1,0,1,1,0,0,0,0,0,1,1,0,1,1,0,0,1,1,0,1,1,0,0,0,1,1,0,1,1,&
&0,0,1,1,0,1,1,0,0,0,0,1,1,0,1,1,0,0,1,1,0,1,1,0,0,0,1,1,0,1,&
&1,0,0,1,1,0,1,1,0,0,0,0,0,0,0,1,1,0,1,1,0,0,1,1,0,1,1,0,0,0,&
&1,1,0,1,1,0,0,1,1,0,1,1,0,0,0,0,1,1,0,1,1,0,0,1,1,0,1,1,0,0,&
&0,1,1,0,1,1,0,0,1,1,0,1,1,0,0,0,0,0,1,1,0,1,1,0,0,1,1,0,1,1,&
&0,0,0,1,1,0,1,1,0,0,1,1,0,1,1,0,0,0,0,1,1,0,1,1,0,0,1,1,0,1,&
&1,0,0,0,1,1,0,1,1,0,0,1,1,0,1,1,0,0,0,0,0,0,1,1,0,1,1,0,0,1,&
&1,0,1,1,0,0,0,1,1,0,1,1,0,0,1,1,0,1,1,0,0,0,0,1,1,0,1,1,0,0,&
&1,1,0,1,1,0,0,0,1,1,0,1,1,0,0,1,1,0,1,1,0,0,0,0,0,1,1,0,1,1,&
&0,0,1,1,0,1,1,0,0,0,1,1,0,1,1,0,0,1,1,0,1,1,0,0,0,0,1,1,0,1,&
&1,0,0,1,1,0,1,1,0,0,0,1,1,0,1,1,0,0,1,1
DIM b(0 TO k-1) !分母
MAT READ b !http://oeis.org/A000120
DATA 0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,1,2,2,3,2,3,3,4,2,3,3,4,3,4,&
&4,5,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,&
&4,5,5,6,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,&
&4,5,4,5,5,6,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,&
&4,5,5,6,5,6,6,7,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,&
&4,5,3,4,4,5,4,5,5,6,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,&
&4,5,5,6,4,5,5,6,5,6,6,7,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,&
&4,5,4,5,5,6,4,5,5,6,5,6,6,7,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,&
&4,5,5,6,5,6,6,7,5,6,6,7,6,7,7,8,1,2,2,3,2,3,3,4,2,3,3,4,3,4,&
&4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,2,3,3,4,3,4,4,5,3,4,4,5,&
&4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,2,3,3,4,3,4,4,5,3,4,&
&4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,3,4,4,5,4,5,5,6,&
&4,5,5,6,5,6,6,7,4,5,5,6,5,6,6,7,5,6,6,7,6,7,7,8,2,3,3,4,3,4,&
&4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,3,4,4,5,&
&4,5,5,6,4,5,5,6,5,6,6,7,4,5,5,6,5,6,6,7,5,6,6,7,6,7,7,8,3,4,&
&4,5,4,5,5,6,4,5,5,6,5,6,6,7,4,5,5,6,5,6,6,7,5,6,6,7,6,7,7,8,&
&4,5,5,6,5,6,6,7,5,6,6,7,6,7,7,8,5,6,6,7
LET m=0
FOR n=0 TO k-8
IF a(n)=1 THEN
LET nn=n
LET cc=cc+1
LET a1=2^(nn+1)
LET b1=FACT(2*m+1)/(FACT(m)^2*2^b(m))
! PRINT a1/b1
LET s=s+a1/b1
LET m=m+1
LET b2=FACT(2*(m)+1)/(FACT(m)^2*2^b(m))
! PRINT a1/b2
LET s=s+a1/b2
LET m=m+1
END if
NEXT n
!PRINT s
!PRINT pi
PRINT cc;"loop"
PRINT USING"####." & REPEAT$("#",999):s
PRINT USING"####." & REPEAT$("#",999):LPI(1)
END
EXTERNAL FUNCTION LPI(x) !PiRamanujan.BAS
OPTION ARITHMETIC RATIONAL
! 繰り返し回数
LET iter = 130 !127
! 初期値
LET a = 1103 * SQRT(8) / 9801
LET s = a
!PRINT USING "###":0;
LET ss=1 / s
!PRINT USING"####." & REPEAT$("#",999):ss
! 繰り返し
FOR i = 1 TO iter
LET a = a * (4 * i - 1) * (4 * i - 2) * (4 * i - 3) * (26390 * i + 1103)
LET a = a / 6147814464 / i^3 / (26390 * i - 25287)
LET s = s + a
!PRINT USING "###":i;
LET ss=1 / s
!PRINT USING"####." & REPEAT$("#",999):ss
NEXT i
LET LPI=ss
END FUNCTION
EXTERNAL FUNCTION SQRT(n)
OPTION ARITHMETIC RATIONAL
LET x=n !SQR(x)
LET z=0.5
LET a=(1+x)*z
LET b=x/a
DO
LET c=(a+b)*z
LET d=x/c
LET a=c
LET b=d
LET aa=ROUND(a,1000)
LET bb=ROUND(b,1000)
LOOP UNTIL aa=bb
LET SQRT=b
END FUNCTION
----------------------------------
☆---分子----------------------------------------
A101926 http://oeis.org/A101926
2^A101925(n).
A101925 http://oeis.org/A101925
A005187(n) + 1.
A005187---http://oeis.org/A005187 http://oeis.org/A079559
A079559
MOD(A108918,2)=A079559
!PiRamanujan.BAS
OPTION ARITHMETIC RATIONAL
!Ramanujanの公式 http://www.geocities.jp/midarekazu/multi.html
LET t0=TIME
LET kou=1
LET s=kou*1103
LET i=1
DO
LET kou=kou*(4*i-1)*(4*i-2)*(4*i-3)/(6147814464*i^3)
LET s=s+kou*(26390*i+1103)
!PRINT s
LET i=i+1
LOOP WHILE ABS(kou)>1E-10001 !EPS(0)
LET x=8 ! SQR(8)をコンパイラに事前に計算させないため
LET s=9801/(s*SQRT(x))
!PRINT USING"#." & REPEAT$("#",999): s
!PRINT USING"#." & REPEAT$("#",999): PI
LET TM=TIME-t0
PRINT USING"####." & REPEAT$("#",2):TM;
PRINT "秒"
LET t0=TIME
LET s=s-3
PRINT "3."
PRINT "[";STR$(1)&"-";STR$(1000)&"]"
PRINT
DO
LET s=s*10
LET b=INT(s)
LET cc=cc+1
IF MOD(cc,5)=0 THEN PRINT STR$(b)&" "; ELSE PRINT STR$(b);
IF MOD(cc,50)=0 THEN PRINT
IF MOD(cc,1000)=0 THEN
PRINT
PRINT "[";STR$(cc+1)&"-";STR$(cc+1000)&"]"
PRINT
END IF
LET s=s-b
LOOP UNTIL cc>1E4-1
PRINT
LET TM=TIME-t0
PRINT USING"####." & REPEAT$("#",2):TM;
PRINT "秒"
END
EXTERNAL FUNCTION SQRT(n)
OPTION ARITHMETIC RATIONAL
LET x=n !SQR(x)
LET z=0.5
LET a=(1+x)*z
LET b=x/a
DO
LET c=(a+b)*z
LET d=x/c
LET a=c
LET b=d
LET aa=ROUND(a,10001)
LET bb=ROUND(b,10001)
LOOP UNTIL aa=bb
LET SQRT=b
END FUNCTION
-----------------------------------------------------
1万桁の設定
! √2 5万桁出力
OPTION ARITHMETIC RATIONAL
LET t0=TIME
LET s=SQRT(2)
!PRINT USING"#." & REPEAT$("#",999): s
LET TM=TIME-t0
PRINT USING"####." & REPEAT$("#",2):TM;
PRINT "秒"
LET t0=TIME
LET s=s-1
PRINT "1."
PRINT "[";STR$(1)&"-";STR$(1000)&"]"
PRINT
DO
LET s=s*10
LET b=INT(s)
LET cc=cc+1
IF MOD(cc,5)=0 THEN PRINT STR$(b)&" "; ELSE PRINT STR$(b);
IF MOD(cc,50)=0 THEN PRINT
IF MOD(cc,1000)=0 THEN
PRINT
PRINT "[";STR$(cc+1)&"-";STR$(cc+1000)&"]"
PRINT
END IF
LET s=s-b
LOOP UNTIL cc>5E4-1
PRINT
LET TM=TIME-t0
PRINT USING"####." & REPEAT$("#",2):TM;
PRINT "秒"
END
EXTERNAL FUNCTION SQRT(n)
OPTION ARITHMETIC RATIONAL
LET x=n !SQR(x)
LET z=0.5
LET a=(1+x)*z
LET b=x/a
DO
LET c=(a+b)*z
LET d=x/c
LET a=c
LET b=d
LET aa=ROUND(a,50001)
LET bb=ROUND(b,50001)
LOOP UNTIL aa=bb
LET SQRT=b
END FUNCTION
--------------------------------------
設定はLET s=SQRT(x) 欠点は数値が増大すると計算が遅くなる
有効桁数の設定
LET aa=ROUND(a,50001)
LET bb=ROUND(b,50001)
! √2 5万桁出力
OPTION ARITHMETIC RATIONAL
LET t0=TIME
LET s=SQRT(2)
!PRINT USING"#." & REPEAT$("#",999): s
LET TM=TIME-t0
PRINT USING"####." & REPEAT$("#",2):TM;
PRINT "秒"
LET t0=TIME
OPEN #1: TextWindow1
ERASE #1
LET s=s-1
PRINT #1: "1."
PRINT #1: "[";STR$(1)&"-";STR$(1000)&"]"
PRINT #1
DO
LET s=s*10
LET b=INT(s)
LET cc=cc+1
IF MOD(cc,5)=0 THEN PRINT #1: STR$(b)&" "; ELSE PRINT #1: STR$(b);
IF MOD(cc,50)=0 THEN PRINT #1
IF MOD(cc,1000)=0 THEN
PRINT #1
PRINT #1: "[";STR$(cc+1)&"-";STR$(cc+1000)&"]"
PRINT #1
END IF
LET s=s-b
LOOP UNTIL cc>5E4-1
CLOSE #1
PRINT
LET TM=TIME-t0
PRINT USING"####." & REPEAT$("#",2):TM;
PRINT "秒"
END
EXTERNAL FUNCTION SQRT(x) !SQR(x)
OPTION ARITHMETIC RATIONAL
LET d=10^(-50001) ! 精度(小数点以下d桁)
LET z=0.5
LET a=(1+x)*z
LET b=x/a
DO
LET a=(a+b)*z
LET b=x/a
LOOP UNTIL ABS(a-b)<d
LET SQRT=b
END FUNCTION
EXTERNAL SUB SATN(S(),XX)!'ATN(1/X)
!'ATN(1/X)=X/(X^2+1)*(1+(2)/(3)*1/(X^2+1)+(2*4)/(3*5)*(1/(X^2+1)^2+(2*4*6)/(3*5*7)*(1/(X^2+1))^3+...
DIM SS(-BIAS-1 TO KETA),Y(-BIAS-1 TO KETA)
LET Y(0)=1
LET Y(SIGN)=1
CALL SDIV(Y,XX*XX+1)
CALL SMUL(Y,XX)
CALL LCOPY(S,Y)
DO
LET N=N+1
CALL LCOPY(SS,S)
CALL SMUL(Y,2*N)
CALL SDIV(Y,2*N+1)
CALL SDIV(Y,XX*XX+1)
CALL LADD2(S,Y)
LOOP UNTIL EQUAL(SS,S)<>0
END SUB
EXTERNAL SUB DISPLAY(X(),N$)
IF N$="" THEN
OPEN #1:TEXTWINDOW1
ELSE
OPEN #1:NAME N$
END IF
ERASE #1
FOR K=-BIAS TO 0
IF X(K)<>0 THEN EXIT FOR
NEXT K
IF X(SIGN)=-1 THEN PRINT #1:"- ";
IF K>=0 THEN
LET K=0
PRINT #1:STR$(X(0));"."
ELSE
PRINT #1:STR$(X(K));
FOR I=K+1 TO 0
LET A$=A$&RIGHT$("000"&STR$(X(I)),4)
IF LEN(A$)=100 THEN
PRINT #1:A$
LET A$=""
END IF
NEXT I
IF LEN(A$)>0 THEN
PRINT #1:A$;"."
LET A$=""
END IF
END IF
LET S=0
FOR I=1 TO KETA-EPS
LET A$=A$&RIGHT$("000"&STR$(X(I)),4)
IF LEN(A$)=100 THEN
LET S=S+100
FOR J=1 TO 10
PRINT #1:LEFT$(A$,10);" ";
IF J=5 THEN PRINT #1:" ";
LET A$=RIGHT$(A$,LEN(A$)-10)
NEXT J
PRINT #1:":";S
LET A$=""
IF MOD(S,1000)=0 THEN PRINT #1
END IF
NEXT I
IF LEN(A$)>0 THEN
LET S=S+LEN(A$)
LET A$=A$&REPEAT$(" ",10)
FOR J=1 TO 9
PRINT #1:RTRIM$(LEFT$(A$,10));" ";
IF J=5 THEN PRINT #1:" ";
LET A$=RIGHT$(A$,LEN(A$)-10)
IF RTRIM$(A$)="" THEN EXIT FOR
NEXT J
IF A$<>"" THEN PRINT #1:A$
END IF
CLOSE #1
END SUB
EXTERNAL SUB LCLR(X())
MAT X=ZER
LET X(SIGN)=1
END SUB
EXTERNAL SUB LCOPY(X(),Y())
MAT X=Y
END SUB
EXTERNAL SUB LADD(A(),B(),C())
LET SIGNA=A(SIGN)
LET SIGNB=B(SIGN)
IF SIGNA=1 AND SIGNB=-1 THEN
LET B(SIGN)=1
CALL LSUB(A,B,C)
LET B(SIGN)=-1
EXIT SUB
ELSEIF SIGNA=-1 AND SIGNB=1 THEN
LET A(SIGN)=1
CALL LSUB(B,A,C)
LET A(SIGN)=-1
EXIT SUB
END IF
MAT C=A+B
FOR I=KETA TO-BIAS+1 STEP-1
IF C(I)>=10000 THEN
LET C(I)=MOD(C(I),10000)
LET C(I-1)=C(I-1)+1
END IF
NEXT I
IF C(-BIAS)>=10000 THEN PRINT "OVER FLOW in LADD"
IF SIGNA=-1 AND SIGNB=-1 THEN LET C(SIGN)=-1 ELSE LET C(SIGN)=1
END SUB
EXTERNAL SUB LADD2(A(),B())
DIM C(-BIAS-1 TO KETA)
CALL LADD(A,B,C)
CALL LCOPY(A,C)
END SUB
EXTERNAL SUB LSUB(A(),B(),C())
LET SIGNA=A(SIGN)
LET SIGNB=B(SIGN)
LET A(SIGN)=1
LET B(SIGN)=1
IF SIGNA*SIGNB=-1 THEN
CALL LADD(A,B,C)
LET C(SIGN)=SIGNA
LET A(SIGN)=SIGNA
LET B(SIGN)=SIGNB
EXIT SUB
END IF
LET GR=GREAT(A,B)
IF SIGNA=1 AND SIGNB=1 THEN
IF GR<>0 THEN
MAT C=A-B
LET C(SIGN)=1
ELSE
MAT C=B-A
LET C(SIGN)=-1
END IF
ELSE
IF GR<>0 THEN
MAT C=B-A
LET C(SIGN)=1
ELSE
MAT C=A-B
LET C(SIGN)=-1
END IF
END IF
FOR I=KETA TO-BIAS+1 STEP-1
IF C(I)<0 THEN
LET C(I)=C(I)+10000
LET C(I-1)=C(I-1)-1
END IF
NEXT I
LET A(SIGN)=SIGNA
LET B(SIGN)=SIGNB
END SUB
EXTERNAL SUB LSUB2(A(),B())
DIM C(-BIAS-1 TO KETA)
CALL LSUB(A,B,C)
CALL LCOPY(A,C)
END SUB
EXTERNAL SUB SMUL(A(),XA)
LET SIGNA=A(SIGN)
LET SG=SGN(XA)
LET XA=ABS(XA)
MAT A=XA*A
FOR I=KETA TO-BIAS+1 STEP-1
IF A(I)>=10000 THEN
LET R=INT(A(I)/10000)
LET A(I)=MOD(A(I),10000)
LET A(I-1)=A(I-1)+R
END IF
NEXT I
IF A(-BIAS)>=10000 THEN PRINT "OVER FLOW in SMUL"
IF SIGNA*SG=-1 THEN LET A(SIGN)=-1 ELSE LET A(SIGN)=1
END SUB
EXTERNAL SUB SDIV(A(),XA)
LET SIGNA=A(SIGN)
LET SG=SGN(XA)
LET XA=ABS(XA)
FOR I=-BIAS TO KETA-1
LET R=A(I)-INT(A(I)/XA)*XA
LET A(I)=INT(A(I)/XA)
LET A(I+1)=A(I+1)+R*10000
NEXT I
LET A(KETA)=INT(A(KETA)/XA)
IF SIGNA*SG=-1 THEN LET A(SIGN)=-1
END SUB
EXTERNAL FUNCTION GREAT(A(),B())
LET SIGNA=A(SIGN)
LET SIGNB=B(SIGN)
IF SIGNA=-1 AND SIGNB=1 THEN
LET GREAT=0
EXIT FUNCTION
END IF
IF SIGNA=1 AND SIGNB=-1 THEN
LET GREAT=-1
EXIT FUNCTION
END IF
FOR I=-BIAS TO KETA
IF SIGNA=-1 AND SIGNB=-1 THEN
IF A(I)<B(I)THEN
LET GREAT=-1
EXIT FUNCTION
END IF
IF A(I)>B(I)THEN
LET GREAT=0
EXIT FUNCTION
END IF
ELSE
IF A(I)>B(I)THEN
LET GREAT=-1
EXIT FUNCTION
END IF
IF A(I)<B(I)THEN
LET GREAT=0
EXIT FUNCTION
END IF
END IF
NEXT I
LET GREAT=0
END FUNCTION
EXTERNAL FUNCTION EQUAL(A(),B())
FOR I=-BIAS-1 TO KETA-EPS
IF A(I)<>B(I)THEN
LET EQUAL=0
EXIT FUNCTION
END IF
NEXT I
LET EQUAL=-1
END FUNCTION
!'SQR(NN)=P/Q*(1-L/M)^(-1/2)
PUBLIC NUMERIC KETA,EPS,SIGN,NN
OPTION BASE 0
LET KETA=2500
LET EPS=0
LET BIAS=0
LET SIGN=-BIAS-1
LET KETA=KETA+EPS
DIM A(-BIAS-1 TO KETA),S(-BIAS-1 TO KETA),T(-BIAS-1 TO KETA)
LET A(0)=1
LET S(0)=1
LET N=1
READ NN,P,Q,L,M
DATA 2 , 1772 , 1253 , 34 , 3140018
DATA 3 , 2146 , 1239 , 47 , 4605363
DATA 5 , 521 , 233 , 4 , 271445
DATA 6 , 703 , 287 , 5 , 494214
DATA 7 , 1643 , 621 , 38 , 2699487
DATA 8 , 2011 , 711 , 47 , 4044168
DATA 10 , 1793 , 567 , 41 , 3214890
DATA 11 , 859 , 259 , 10 , 737891
DATA 12 , 1784 , 515 , 44 , 3182700
DATA 13 , 1435 , 398 , 27 , 2059252
DATA 14 , 2013 , 538 , 47 , 4052216
DATA 15 , 945 , 244 , 15 , 893040
DATA 17 , 268 , 65 , 1 , 71825
DATA 18 , 2011 , 474 , 47 , 4044168
DATA 19 , 1081 , 248 , 15 , 1168576
DATA 20 , 1042 , 233 , 16 , 1085780
DATA 21 , 1943 , 424 , 47 , 3775296
DATA 22 , 1318 , 281 , 18 , 1737142
DATA 23 , 1597 , 333 , 38 , 2550447
DATA 24 , 1406 , 287 , 20 , 1976856
DATA 26 , 1494 , 293 , 38 , 2232074
DATA 27 , 2146 , 413 , 47 , 4605363
DATA 28 , 1053 , 199 , 19 , 1108828
DATA 29 , 797 , 148 , 7 , 635216
DATA 30 , 1561 , 285 , 29 , 2436750
DATA 31 , 1069 , 192 , 23 , 1142784
DATA 32 , 956 , 169 , 16 , 913952
DATA 33 , 787 , 137 , 8 , 619377
DATA 34 , 1207 , 207 , 17 , 1456866
DATA 35 , 775 , 131 , 10 , 600635
DATA 37 , 809 , 133 , 12 , 654493
DATA 38 , 863 , 140 , 31 , 744800
DATA 39 , 1861 , 298 , 35 , 3463356
DATA 40 , 955 , 151 , 15 , 912040
DATA 41 , 1255 , 196 , 31 , 1575056
DATA 42 , 1847 , 285 , 41 , 3411450
DATA 43 , 400 , 61 , 3 , 160003
DATA 44 , 1718 , 259 , 40 , 2951564
DATA 45 , 1563 , 233 , 36 , 2443005
DATA 46 , 1838 , 271 , 42 , 3378286
DATA 47 , 1282 , 187 , 19 , 1643543
DATA 48 , 1157 , 167 , 23 , 1338672
DATA 50 , 1195 , 169 , 25 , 1428050
DATA 51 , 1364 , 191 , 35 , 1860531
DATA 52 , 1435 , 199 , 27 , 2059252
DATA 53 , 182 , 25 , 1 , 33125
DATA 54 , 2109 , 287 , 45 , 4447926
DATA 55 , 1194 , 161 , 19 , 1425655
DATA 56 , 2013 , 269 , 47 , 4052216
DATA 57 , 1744 , 231 , 41 , 3041577
DATA 58 , 1744 , 229 , 42 , 3041578
DATA 59 , 1951 , 254 , 43 , 3806444
DATA 60 , 945 , 122 , 15 , 893040
DATA 61 , 1687 , 216 , 47 , 2846016
DATA 62 , 937 , 119 , 13 , 877982
DATA 63 , 1643 , 207 , 38 , 2699487
DATA 65 , 1685 , 209 , 40 , 2839265
DATA 66 , 983 , 121 , 17 , 966306
DATA 67 , 221 , 27 , 2 , 48843
DATA 68 , 536 , 65 , 4 , 287300
DATA 69 , 1138 , 137 , 17 , 1295061
DATA 70 , 845 , 101 , 45 , 714070
DATA 71 , 969 , 115 , 14 , 938975
DATA 72 , 2011 , 237 , 47 , 4044168
DATA 73 , 1555 , 182 , 27 , 2418052
DATA 74 , 757 , 88 , 7 , 573056
DATA 75 , 892 , 103 , 11 , 795675
DATA 76 , 1081 , 124 , 15 , 1168576
DATA 77 , 974 , 111 , 41 , 948717
DATA 78 , 892 , 101 , 14 , 795678
DATA 79 , 1271 , 143 , 30 , 1615471
DATA 80 , 474 , 53 , 44 , 224720
DATA 82 , 498 , 55 , 46 , 248050
DATA 83 , 1321 , 145 , 34 , 1745075
DATA 84 , 1943 , 212 , 47 , 3775296
DATA 85 , 673 , 73 , 36 , 452965
DATA 86 , 1085 , 117 , 29 , 1177254
DATA 87 , 513 , 55 , 6 , 263175
DATA 88 , 469 , 50 , 39 , 220000
DATA 89 , 783 , 83 , 32 , 613121
DATA 90 , 1793 , 189 , 41 , 3214890
DATA 91 , 849 , 89 , 10 , 720811
DATA 92 , 681 , 71 , 11 , 463772
DATA 93 , 974 , 101 , 17 , 948693
DATA 94 , 1018 , 105 , 26 , 1036350
DATA 95 , 731 , 75 , 14 , 534375
DATA 96 , 921 , 94 , 15 , 848256
DATA 97 , 1172 , 119 , 33 , 1373617
DATA 98 , 1772 , 179 , 34 , 3140018
DATA 99 , 587 , 59 , 50 , 344619
DO
MAT A=(2*L*N-L)*A
FOR I=0 TO KETA-1
LET R=A(I)-INT(A(I)/2/N/M)*(2*N*M)
LET A(I)=INT(A(I)/2/N/M)
LET A(I+1)=A(I+1)+R*10000
NEXT I
LET A(KETA)=INT(A(KETA)/2/N/M)
MAT S=S+A
FOR I=KETA TO 0 STEP-1
IF S(I)>=10000 THEN
LET R=INT(S(I)/10000)
LET S(I)=S(I)-R*10000
LET S(I-1)=S(I-1)+R
END IF
NEXT I
LET FL=0
FOR I=0 TO KETA
IF S(I)<>T(I)THEN
LET T(I)=S(I)
LET FL=1
LET N=N+1
EXIT FOR
END IF
NEXT I
IF FL=0 THEN EXIT DO
LOOP
MAT S=P*S
FOR I=KETA TO 0 STEP-1
IF S(I)>=10000 THEN
LET R=INT(S(I)/10000)
LET S(I)=S(I)-R*10000
LET S(I-1)=S(I-1)+R
END IF
NEXT I
FOR I=0 TO KETA-1
LET R=S(I)-INT(S(I)/Q)*Q
LET S(I)=INT(S(I)/Q)
LET S(I+1)=S(I+1)+R*10000
NEXT I
LET S(KETA)=INT(S(KETA)/Q)
CALL DISPLAY(S,"")
END
EXTERNAL SUB DISPLAY(X(),N$)
IF N$="" THEN
OPEN #1:TEXTWINDOW1
ELSE
OPEN #1:NAME N$
END IF
ERASE #1
FOR K=-BIAS TO 0
IF X(K)<>0 THEN EXIT FOR
NEXT K
IF X(SIGN)=-1 THEN PRINT #1:"- ";
IF K>=0 THEN
LET K=0
PRINT #1:STR$(X(0));"."
ELSE
PRINT #1:STR$(X(K));
FOR I=K+1 TO 0
LET A$=A$&RIGHT$("000"&STR$(X(I)),4)
IF LEN(A$)=100 THEN
PRINT #1:A$
LET A$=""
END IF
NEXT I
IF LEN(A$)>0 THEN
PRINT #1:A$;"."
LET A$=""
END IF
END IF
LET S=0
FOR I=1 TO KETA-EPS
LET A$=A$&RIGHT$("000"&STR$(X(I)),4)
IF LEN(A$)=100 THEN
LET S=S+100
FOR J=1 TO 10
PRINT #1:LEFT$(A$,10);" ";
IF J=5 THEN PRINT #1:" ";
LET A$=RIGHT$(A$,LEN(A$)-10)
NEXT J
PRINT #1:":";S
LET A$=""
IF MOD(S,1000)=0 THEN PRINT #1
END IF
NEXT I
IF LEN(A$)>0 THEN
LET S=S+LEN(A$)
LET A$=A$&REPEAT$(" ",10)
FOR J=1 TO 9
PRINT #1:RTRIM$(LEFT$(A$,10));" ";
IF J=5 THEN PRINT #1:" ";
LET A$=RIGHT$(A$,LEN(A$)-10)
IF RTRIM$(A$)="" THEN EXIT FOR
NEXT J
IF A$<>"" THEN PRINT #1:A$
END IF
CLOSE #1
END SUB
DATA "11111111111111111111"
DATA "22222222222222222222"
DATA "33333333333333333333"
DATA "44444444444444444444"
DATA "55555555555555555555"
DATA "66666666666666666666"
DATA "77777777777777777777"
DATA "88888888888888888888"
DATA "99999999999999999999"
DATA "00000000000000000000"
DO
READ IF MISSING THEN EXIT DO:A$
LET N=N+1
PRINT N;":";A$
LET S$=S$&A$
LOOP
LET M=LEN(S$)/N
PRINT N;"行";M;"列"
INPUT PROMPT "列=": Q
LET P=LEN(S$)/Q
PRINT P;"行";Q;"列"
FOR I=1 TO LEN(S$) STEP Q
LET C=C+1
PRINT C;":";S$(I:I+Q-1)
NEXT I
END
> k.t.さんへのお返事です。
>
> 下記のプログラムでいいのでしょうか?
>
> DATA "11111111111111111111"
> DATA "22222222222222222222"
> DATA "33333333333333333333"
> DATA "44444444444444444444"
> DATA "55555555555555555555"
> DATA "66666666666666666666"
> DATA "77777777777777777777"
> DATA "88888888888888888888"
> DATA "99999999999999999999"
> DATA "00000000000000000000"
> DO
> READ IF MISSING THEN EXIT DO:A$
> LET N=N+1
> PRINT N;":";A$
> LET S$=S$&A$
> LOOP
> LET M=LEN(S$)/N
> PRINT N;"行";M;"列"
> INPUT PROMPT "列=": Q
> LET P=LEN(S$)/Q
> PRINT P;"行";Q;"列"
> FOR I=1 TO LEN(S$) STEP Q
> LET C=C+1
> PRINT C;":";S$(I:I+Q-1)
> NEXT I
> END
>
DATA 15,210,33,64,55,21
DATA 120,146,25,37,88,91
LET N=3
DO
FOR I=1 TO N-1
READ IF MISSING THEN EXIT DO:A
PRINT STR$(A);",";
NEXT I
READ IF MISSING THEN EXIT DO:A
PRINT STR$(A)
LOOP
END
sample.txt (※わざとデタラメにしています)
------------------------------------
+1, X2 ,3 ,4,++5 -, 6/
7, '8, 9,10 ,1C1 ,12', 13 ,
14,-15,16, *17,18
, ,19,--20, L2 1 A ,22,, +2 3 ,
-,24 ,25, , 26,,,,,=27M,28\, 29,,.,
, 30-
------------------------------------
DIM X$(100)
LET N=3 !'N個ずつ表示させる
OPEN #1:NAME "sample.txt"
DO
LINE INPUT #1,IF MISSING THEN EXIT DO:A$
MAT X$=NUL$
CALL TOKUN(A$,X$,K)
LET I=1
DO UNTIL I>K
LET X$(I)=FILTER$(X$(I))
IF X$(I)<>"" THEN
LET COUNT=COUNT+1
IF MOD(COUNT,N)=0 THEN
PRINT X$(I)
ELSE
PRINT X$(I);",";
END IF
END IF
LET I=I+1
LOOP
LOOP
CLOSE #1
END
EXTERNAL FUNCTION FILTER$(X$) !'フィルター処理
DO
LET FL=0
FOR I=1 TO LEN(X$)
IF POS("0123456789-.",X$(I:I))=0 OR (I<>1 AND X$(I:I)="-") THEN
LET X$(I:I)=""
LET FL=1
EXIT FOR
END IF
NEXT I
LOOP UNTIL FL=0
IF X$="." THEN LET X$=""
IF X$="-" THEN LET X$=""
IF X$="+" THEN LET X$=""
LET FILTER$=X$
END FUNCTION
EXTERNAL SUB TOKUN(A$,X$(),K) !'トークン取り出し
LET B$=A$
LET K=0
DO
LET N=POS(B$,",") !'区切り文字 ","
IF N>0 THEN
LET K=K+1
LET X$(K)=FRONTSTRING$(B$,",")
LET B$=BEHINDSTRING$(B$,",")
END IF
LOOP UNTIL N=0
LET K=K+1
IF RIGHT$(B$,1)="," THEN
LET X$(K)=LEFT$(B$,LEN(B$)-1)
ELSE
LET X$(K)=B$
END IF
END SUB
EXTERNAL FUNCTION FRONTSTRING$(A$,B$) !'前方取り出し
LET N=POS(A$,B$,1)
IF N=0 THEN
LET FRONTSTRING$=A$
ELSE
LET FRONTSTRING$=A$(1:N-1)
END IF
END FUNCTION
EXTERNAL FUNCTION BEHINDSTRING$(A$,B$) !'後方取り出し
LET N=POS(A$,B$,1)
IF N=0 THEN
LET BEHINDSTRING$=A$
ELSE
LET BEHINDSTRING$=A$(N+LEN(B$):LEN(A$))
END IF
END FUNCTION
!***元の文字配列条件指定***
LET m=1 !m行
LET n=6 !n列
!***変更後の文字配列条件指定***
LET p=3 !p行
LET q=2 !q列
!-----------------------------
!
LET mn=m*n
DIM b$(m,n)
DIM c$(mn)
DIM d$(p,q)
!OPEN #1:NAME "c:\temp\データファイル.txt",ACCESS INPUT
FOR g=1 TO m
!LINE INPUT #1:a$
LET a$="12,34,56,78,9,10"!<---for_test_data
print a$
LET mlen=LEN(a$)
LET r=1
LET b$(g,r)=""
FOR i=1 TO mlen
LET nuki$=MID$(a$,i,1)
IF nuki$<>"," then
LET b$(g,r)=b$(g,r) & nuki$
ElseIF nuki$="," then
LET r=r+1
LET b$(g,r)=""
End IF
NEXT I
NEXT G
PRINT
LET mn=0
FOR g=1 TO m
FOR r=1 TO n
LET mn=mn+1
LET c$(mn)=b$(g,r)
next R
NEXT G
LET mn=0
FOR g=1 TO p
FOR r=1 TO q
LET mn=mn+1
LET d$(g,r)=c$(mn)
IF r=q THEN
PRINT d$(g,r)
else
PRINT d$(g,r);",";
end if
NEXT R
NEXT G
LET m=4 ! 元データの行数m
LET n=6 ! 元データの列数n (1行のデータ数)
LET q=8 ! 変換後の列数q
LET p=m*n/q ! 変換後の行数p
IF p<>INT(p) THEN PRINT "ERROR!!"
DIM row0(n)
!DIM A(p,q) ! p*qの配列Aに変換
!OPEN #1 : NAME "***.txt" ! 元データのファイル名
!OPEN #2 : NAME "C:data1.txt" ! 変換後のファイル
!ERASE #2
LET row1$=""
LET k,l=1
FOR i=1 TO m
!MAT INPUT #1 : row0 ! ファイルから1行入力
MAT READ row0 ! DATA文1行の読み込み
FOR j=1 TO n
IF l<q THEN
LET row1$=row1$&STR$(row0(j))&","
!LET A(k,l)=row0(j)
LET l=l+1
ELSE
!PRINT #2 : row1$&STR$(row0(j)) ! ファイルに1行出力
PRINT row1$&STR$(row0(j)) ! PRINT文は遅い
!LET A(k,q)=row0(j)
!LET k=k+1
LET row1$=""
LET l=1
END IF
NEXT j
NEXT i
!MAT PRINT A;
!CLOSE #1
!CLOSE #2
DATA 11,12,13,14,15,16
DATA 21,22,23,24,25,26
DATA 31,32,33,34,35,36
DATA 41,42,43,44,45,46
END
元データの大きさがわからない場合
LET n=10000 ! 元データの列数n。未知の場合は十分に大きな値を指定。
LET mn=5000000 ! データ総数 mn=m*n。未知の場合は十分に大きな値を指定。
DIM row0(n),data0(mn)
SET ECHO "OFF"
OPEN #1 : NAME "***.txt" ! 元データのファイル名
OPEN #2 : NAME "C:data2.txt" ! 変換後のファイル
ERASE #2
LET total=0 ! データ総数 total=m*n
DO
MAT INPUT #1, IF MISSING THEN EXIT DO : row0(?) ! nが既知ならrow0(?)をrowに
FOR i=1 TO UBOUND(row0) ! nが既知ならUBOUND(row0)をnに
LET data0(total+i)=row0(i)
NEXT i
LET total=total+i-1
MAT row0=ZER(n) ! 配列の再定義(1行のデータ数が一定ならば,この命令は不要)
LOOP
MAT REDIM data0(1 TO total)
DO
INPUT PROMPT "行数pを入力(データ総数"&STR$(total)&")":p
LOOP UNTIL p>0 AND total/p=INT(total/p)
LET q=total/p
!DIM A(p,q) ! p*qの配列Aに変換
LET i=1
FOR k=1 TO p
LET row1$=""
FOR l=1 TO q-1
LET row1$=row1$&STR$(data0(i))&","
!LET A(k,l)=data0(i)
LET i=i+1
NEXT l
PRINT #2 : row1$&STR$(data0(i)) ! ファイルに1行出力
PRINT row1$&STR$(data0(i)) ! PRINT文は遅い
!LET A(k,q)=data0(i)
LET i=i+1
NEXT k
!MAT PRINT A;
CLOSE #1
CLOSE #2
END
! 下記のように元データが不揃いでも読み込み可能
! 11,12,13,14,15,16
! 21,22,23,24,25
! 31,32,33,34,35,36,37
! 41,42,43,44,45,46
LET KETA=2500 <-----ここの数字で桁数を調整してください。ここでは2500*4で1万桁です
LET SIGN=-BIAS-1
LET EPS=0 <---------ここを増やしてください。1上げる毎に4桁分増えます。
LET KETA=KETA+EPS
EXTERNAL FUNCTION EQUAL(A(),B())
FOR I=-BIAS-1 TO KETA-EPS <--------ここで誤差分を打ち切っています。
IF A(I)<>B(I)THEN
LET EQUAL=0
EXIT FUNCTION
END IF
NEXT I
LET EQUAL=-1
END FUNCTION
> たろささんへのお返事です。
>
> LET KETA=2500 <-----ここの数字で桁数を調整してください。ここでは2500*4で1万桁です
> LET SIGN=-BIAS-1
> LET EPS=0 <---------ここを増やしてください。1上げる毎に4桁分増えます。
> LET KETA=KETA+EPS
>
> EXTERNAL FUNCTION EQUAL(A(),B())
> FOR I=-BIAS-1 TO KETA-EPS <--------ここで誤差分を打ち切っています。
> IF A(I)<>B(I)THEN
> LET EQUAL=0
> EXIT FUNCTION
> END IF
> NEXT I
> LET EQUAL=-1
> END FUNCTION
>
DIM X$(100)
LET N=3 !'N個ずつ表示させる
OPEN #1:NAME "sample.txt"
OPEN #2:NAME "pi_s.txt" !,RECTYPE INTERNAL
ERASE #2
DO
LINE INPUT #1,IF MISSING THEN EXIT DO:A$
MAT X$=NUL$
CALL TOKUN(A$,X$,K)
LET I=1
DO UNTIL I>K
LET X$(I)=LTRIM$(RTRIM$(X$(I)))
IF X$(I)<>"" THEN
LET COUNT=COUNT+1
IF MOD(COUNT,N)=0 THEN
WRITE #2:X$(I)
ELSE
WRITE #2:X$(I)!;",";
END IF
END IF
LET I=I+1
LOOP
LOOP
CLOSE #1
CLOSE #2
END
EXTERNAL SUB TOKUN(A$,X$(),K) !'トークン取り出し
LET B$=A$
LET K=0
DO
LET N=POS(B$," ") !'区切り文字 ","
IF N>0 THEN
LET K=K+1
LET X$(K)=FRONTSTRING$(B$," ")
LET B$=BEHINDSTRING$(B$," ")
END IF
LOOP UNTIL N=0
LET K=K+1
IF RIGHT$(B$,1)=" " THEN
LET X$(K)=LEFT$(B$,LEN(B$)-1)
ELSE
LET X$(K)=B$
END IF
END SUB
EXTERNAL FUNCTION FRONTSTRING$(A$,B$) !'前方取り出し
LET N=POS(A$,B$,1)
IF N=0 THEN
LET FRONTSTRING$=A$
ELSE
LET FRONTSTRING$=A$(1:N-1)
END IF
END FUNCTION
EXTERNAL FUNCTION BEHINDSTRING$(A$,B$) !'後方取り出し
LET N=POS(A$,B$,1)
IF N=0 THEN
LET BEHINDSTRING$=A$
ELSE
LET BEHINDSTRING$=A$(N+LEN(B$):LEN(A$))
END IF
END FUNCTION
--------------------------------------------------
近藤さんの円周率計算ソフト算出DATA 読み込み成功
DIM COUNT(0 TO 9)
FILE GETNAME F$,"ファイル|*.*"
IF F$="" THEN STOP
OPEN #1:NAME F$
DO
CHARACTER INPUT #1,IF MISSING THEN EXIT DO:A$
IF A$>="0" AND A$<="9" THEN
LET NUM=NUM+1
LET P=VAL(A$)
LET COUNT(P)=COUNT(P)+1
!'IF NUM>1000000 THEN EXIT DO
END IF
LOOP
CLOSE #1
FOR I=0 TO 9
PRINT I;":";COUNT(I)
LET SUM=SUM+COUNT(I)
NEXT I
PRINT "SUM:";SUM
END
!http://6317.teacup.com/basic/bbs/3978
!Re: Sieve of Sundaram サンダラムの篩(ふるい) 投稿者:nagram 様
!Sieve of Sundaram PBA
OPTION ARITHMETIC NATIVE !2進モード
LET t0=TIME
LET M=999999900000/2-1 !素数 最小値
LET N=1000001000000/2 !素数 最大値
LET C=37607908405
LET LL=(N-M)*7
DIM A(LL)
MAT A=ZER
LET S=3
LET D=4
LET k=INT(SQR(N))*3
LET cf=0
DO
LET B=D+S*INT((M-D)/S) !ここが改良のポイント
DO UNTIL B>=M
LET B=B+S
LOOP
FOR I=B TO N STEP S
LET cf=cf+1
LET A(cf)=I
NEXT I
LET S=S+2
LET D=D+3
LOOP UNTIL D>k
PRINT cf
LET TM=TIME-t0
PRINT USING"####." & REPEAT$("#",2):TM;
PRINT "秒"
CALL QUICKSORT(1,cf,A)
!FOR n=1 TO cf
! IF A(n)<>A(n+1) THEN PRINT n;":";A(n)
!NEXT n
LET TM=TIME-t0
PRINT USING"####." & REPEAT$("#",2):TM;
PRINT "秒"
!OPEN #1: TextWindow1
!ERASE #1
OPEN #1:NAME "prime_1_12x.txt",RECTYPE INTERNAL
ERASE #1
FOR n=1 TO cf
IF A(n)=A(n+1) THEN GOTO 50
LET n1=A(n)+1
LET n2=A(n+1)-1
FOR z=n1 TO n2
LET C=C+1
LET Sundaram=z*2+1
!PRINT #1:c;":";Sundaram
WRITE #1:Sundaram,c
NEXT z
50 NEXT n
CLOSE #1
LET TM=TIME-t0
PRINT USING"####." & REPEAT$("#",2):TM;
PRINT "秒"
END
EXTERNAL SUB QUICKSORT(FI,LA,D())!,E())
OPTION ARITHMETIC NATIVE !2進モード
LET X=D((FI+LA)/2)
LET I=FI
LET J=LA
DO
DO WHILE D(I)<X
LET I=I+1
LOOP
DO WHILE X<D(J)
LET J=J-1
LOOP
IF I>=J THEN EXIT DO
SWAP D(I),D(J)
LET I=I+1
LET J=J-1
LOOP
IF FI<I-1 THEN CALL QUICKSORT(FI,I-1,D)
IF J+1<LA THEN CALL QUICKSORT(J+1,LA,D)
END SUB
!http://6317.teacup.com/basic/bbs/3978
!Re: Sieve of Sundaram サンダラムの篩(ふるい) 投稿者:nagram 様
!Sieve of Sundaram PBA
OPTION ARITHMETIC NATIVE !2進モード
LET t0=TIME
LET M=999999900000/2-1 !素数 最小値
LET W=M-1
LET N=1000001000000/2 !素数 最大値
LET C=37607908405
DIM A(1 TO N-W)
MAT A=ZER
LET S=3
LET D=4
LET k=INT(SQR(N))*3
LET cf=0
DO
LET B=D+S*INT((M-D)/S) !ここが改良のポイント
DO UNTIL B>=M
LET B=B+S
LOOP
FOR I=B TO N STEP S
LET cf=cf+1
LET A(I-W)=1
NEXT I
LET S=S+2
LET D=D+3
LOOP UNTIL D>k
PRINT cf
LET TM=TIME-t0
PRINT USING"####." & REPEAT$("#",2):TM;
PRINT "秒"
!OPEN #1: TextWindow1
!ERASE #1
OPEN #1:NAME "prime_1_12x.txt",RECTYPE INTERNAL
ERASE #1
FOR n=1 TO N-W
IF A(n)=0 THEN
LET n1=n+W
LET C=C+1
LET Sundaram=n1*2+1
!PRINT #1:c;":";Sundaram
WRITE #1:Sundaram,c
END IF
NEXT n
CLOSE #1
LET TM=TIME-t0
PRINT USING"####." & REPEAT$("#",2):TM;
PRINT "秒"
END
----------------------------------------------------
> PUBLIC NUMERIC BIAS,KETA,SIGN,EPS
> LET BIAS=0
> LET KETA=2500 !'桁数=KETA*4
> LET SIGN=-BIAS-1
> LET EPS=0
> LET KETA=KETA+EPS
> DIM X(-BIAS-1 TO KETA),S(-BIAS-1 TO KETA)
> !'π/4=2805*ATN(1/5257)-398*ATN(1/9466)+1950*ATN(1/12943)+1850*ATN(1/34208)+2021*ATN(1/44179)+2097*ATN(1/85353)+1484*ATN(1/114669)+1389*ATN(1/330182)+808*ATN(1/485298)
> PRINT(KETA-EPS)*4;"桁の計算開始 ";TIME$
> LET T=TIME
> PRINT "2805*ATN(1/5257) ";TIME$
> CALL SATN(X,5257)
> CALL SMUL(X,2805*4)
> CALL LCOPY(S,X)
> PRINT "398*ATN(1/9466) ";TIME$
> CALL SATN(X,9466)
> CALL SMUL(X,398*4)
> CALL LSUB2(S,X)
> PRINT "1950*ATN(1/12943) ";TIME$
> CALL SATN(X,12943)
> CALL SMUL(X,1950*4)
> CALL LADD2(S,X)
> PRINT "1850*ATN(1/34208) ";TIME$
> CALL SATN(X,34208)
> CALL SMUL(X,1850*4)
> CALL LADD2(S,X)
> PRINT "2021*ATN(1/44179) ";TIME$
> CALL SATN(X,44179)
> CALL SMUL(X,2021*4)
> CALL LADD2(S,X)
> PRINT "2097*ATN(1/85353) ";TIME$
> CALL SATN(X,85353)
> CALL SMUL(X,2097*4)
> CALL LADD2(S,X)
> PRINT "1484*ATN(1/114669) ";TIME$
> CALL SATN(X,114669)
> CALL SMUL(X,1484*4)
> CALL LADD2(S,X)
> PRINT "1389*ATN(1/330182) ";TIME$
> CALL SATN(X,330182)
> CALL SMUL(X,1389*4)
> CALL LADD2(S,X)
> PRINT "808*ATN(1/485298) ";TIME$
> CALL SATN(X,485298)
> CALL SMUL(X,808*4)
> CALL LADD2(S,X)
> PRINT "計算終了 ";TIME$;TIME-T
> CALL DISPLAY(S,"")
> END
>
> EXTERNAL SUB SATN(S(),XX)!'ATN(1/X)
> !'ATN(1/X)=X/(X^2+1)*(1+(2)/(3)*1/(X^2+1)+(2*4)/(3*5)*(1/(X^2+1)^2+(2*4*6)/(3*5*7)*(1/(X^2+1))^3+...
> DIM SS(-BIAS-1 TO KETA),Y(-BIAS-1 TO KETA)
> LET Y(0)=1
> LET Y(SIGN)=1
> CALL SDIV(Y,XX*XX+1)
> CALL SMUL(Y,XX)
> CALL LCOPY(S,Y)
> DO
> LET N=N+1
> CALL LCOPY(SS,S)
> CALL SMUL(Y,2*N)
> CALL SDIV(Y,2*N+1)
> CALL SDIV(Y,XX*XX+1)
> CALL LADD2(S,Y)
> LOOP UNTIL EQUAL(SS,S)<>0
> END SUB
>
> EXTERNAL SUB DISPLAY(X(),N$)
> IF N$="" THEN
> OPEN #1:TEXTWINDOW1
> ELSE
> OPEN #1:NAME N$
> END IF
> ERASE #1
> FOR K=-BIAS TO 0
> IF X(K)<>0 THEN EXIT FOR
> NEXT K
> IF X(SIGN)=-1 THEN PRINT #1:"- ";
> IF K>=0 THEN
> LET K=0
> PRINT #1:STR$(X(0));"."
> ELSE
> PRINT #1:STR$(X(K));
> FOR I=K+1 TO 0
> LET A$=A$&RIGHT$("000"&STR$(X(I)),4)
> IF LEN(A$)=100 THEN
> PRINT #1:A$
> LET A$=""
> END IF
> NEXT I
> IF LEN(A$)>0 THEN
> PRINT #1:A$;"."
> LET A$=""
> END IF
> END IF
> LET S=0
> FOR I=1 TO KETA-EPS
> LET A$=A$&RIGHT$("000"&STR$(X(I)),4)
> IF LEN(A$)=100 THEN
> LET S=S+100
> FOR J=1 TO 10
> PRINT #1:LEFT$(A$,10);" ";
> IF J=5 THEN PRINT #1:" ";
> LET A$=RIGHT$(A$,LEN(A$)-10)
> NEXT J
> PRINT #1:":";S
> LET A$=""
> IF MOD(S,1000)=0 THEN PRINT #1
> END IF
> NEXT I
> IF LEN(A$)>0 THEN
> LET S=S+LEN(A$)
> LET A$=A$&REPEAT$(" ",10)
> FOR J=1 TO 9
> PRINT #1:RTRIM$(LEFT$(A$,10));" ";
> IF J=5 THEN PRINT #1:" ";
> LET A$=RIGHT$(A$,LEN(A$)-10)
> IF RTRIM$(A$)="" THEN EXIT FOR
> NEXT J
> IF A$<>"" THEN PRINT #1:A$
> END IF
> CLOSE #1
> END SUB
>
> EXTERNAL SUB LCLR(X())
> MAT X=ZER
> LET X(SIGN)=1
> END SUB
>
> EXTERNAL SUB LCOPY(X(),Y())
> MAT X=Y
> END SUB
>
> EXTERNAL SUB LADD(A(),B(),C())
> LET SIGNA=A(SIGN)
> LET SIGNB=B(SIGN)
> IF SIGNA=1 AND SIGNB=-1 THEN
> LET B(SIGN)=1
> CALL LSUB(A,B,C)
> LET B(SIGN)=-1
> EXIT SUB
> ELSEIF SIGNA=-1 AND SIGNB=1 THEN
> LET A(SIGN)=1
> CALL LSUB(B,A,C)
> LET A(SIGN)=-1
> EXIT SUB
> END IF
> MAT C=A+B
> FOR I=KETA TO-BIAS+1 STEP-1
> IF C(I)>=10000 THEN
> LET C(I)=MOD(C(I),10000)
> LET C(I-1)=C(I-1)+1
> END IF
> NEXT I
> IF C(-BIAS)>=10000 THEN PRINT "OVER FLOW in LADD"
> IF SIGNA=-1 AND SIGNB=-1 THEN LET C(SIGN)=-1 ELSE LET C(SIGN)=1
> END SUB
>
> EXTERNAL SUB LADD2(A(),B())
> DIM C(-BIAS-1 TO KETA)
> CALL LADD(A,B,C)
> CALL LCOPY(A,C)
> END SUB
>
> EXTERNAL SUB LSUB(A(),B(),C())
> LET SIGNA=A(SIGN)
> LET SIGNB=B(SIGN)
> LET A(SIGN)=1
> LET B(SIGN)=1
> IF SIGNA*SIGNB=-1 THEN
> CALL LADD(A,B,C)
> LET C(SIGN)=SIGNA
> LET A(SIGN)=SIGNA
> LET B(SIGN)=SIGNB
> EXIT SUB
> END IF
> LET GR=GREAT(A,B)
> IF SIGNA=1 AND SIGNB=1 THEN
> IF GR<>0 THEN
> MAT C=A-B
> LET C(SIGN)=1
> ELSE
> MAT C=B-A
> LET C(SIGN)=-1
> END IF
> ELSE
> IF GR<>0 THEN
> MAT C=B-A
> LET C(SIGN)=1
> ELSE
> MAT C=A-B
> LET C(SIGN)=-1
> END IF
> END IF
> FOR I=KETA TO-BIAS+1 STEP-1
> IF C(I)<0 THEN
> LET C(I)=C(I)+10000
> LET C(I-1)=C(I-1)-1
> END IF
> NEXT I
> LET A(SIGN)=SIGNA
> LET B(SIGN)=SIGNB
> END SUB
>
> EXTERNAL SUB LSUB2(A(),B())
> DIM C(-BIAS-1 TO KETA)
> CALL LSUB(A,B,C)
> CALL LCOPY(A,C)
> END SUB
>
> EXTERNAL SUB SMUL(A(),XA)
> LET SIGNA=A(SIGN)
> LET SG=SGN(XA)
> LET XA=ABS(XA)
> MAT A=XA*A
> FOR I=KETA TO-BIAS+1 STEP-1
> IF A(I)>=10000 THEN
> LET R=INT(A(I)/10000)
> LET A(I)=MOD(A(I),10000)
> LET A(I-1)=A(I-1)+R
> END IF
> NEXT I
> IF A(-BIAS)>=10000 THEN PRINT "OVER FLOW in SMUL"
> IF SIGNA*SG=-1 THEN LET A(SIGN)=-1 ELSE LET A(SIGN)=1
> END SUB
>
> EXTERNAL SUB SDIV(A(),XA)
> LET SIGNA=A(SIGN)
> LET SG=SGN(XA)
> LET XA=ABS(XA)
> FOR I=-BIAS TO KETA-1
> LET R=A(I)-INT(A(I)/XA)*XA
> LET A(I)=INT(A(I)/XA)
> LET A(I+1)=A(I+1)+R*10000
> NEXT I
> LET A(KETA)=INT(A(KETA)/XA)
> IF SIGNA*SG=-1 THEN LET A(SIGN)=-1
> END SUB
>
> EXTERNAL FUNCTION GREAT(A(),B())
> LET SIGNA=A(SIGN)
> LET SIGNB=B(SIGN)
> IF SIGNA=-1 AND SIGNB=1 THEN
> LET GREAT=0
> EXIT FUNCTION
> END IF
> IF SIGNA=1 AND SIGNB=-1 THEN
> LET GREAT=-1
> EXIT FUNCTION
> END IF
> FOR I=-BIAS TO KETA
> IF SIGNA=-1 AND SIGNB=-1 THEN
> IF A(I)<B(I)THEN
> LET GREAT=-1
> EXIT FUNCTION
> END IF
> IF A(I)>B(I)THEN
> LET GREAT=0
> EXIT FUNCTION
> END IF
> ELSE
> IF A(I)>B(I)THEN
> LET GREAT=-1
> EXIT FUNCTION
> END IF
> IF A(I)<B(I)THEN
> LET GREAT=0
> EXIT FUNCTION
> END IF
> END IF
> NEXT I
> LET GREAT=0
> END FUNCTION
>
> EXTERNAL FUNCTION EQUAL(A(),B())
> FOR I=-BIAS-1 TO KETA-EPS
> IF A(I)<>B(I)THEN
> LET EQUAL=0
> EXIT FUNCTION
> END IF
> NEXT I
> LET EQUAL=-1
> END FUNCTION
>
! zeta(2),ζ(2)
DEF f(x)=1/x^2
SET WINDOW -1,5,-1,5
DRAW grid
FOR x=0.01 TO 5 STEP 0.01
PLOT x,f(x);
NEXT x
SET AREA COLOR 2
FOR x=1 TO PI^2/6 STEP 0.001
PLOT AREA:x,0;x,f(x);x,0
NEXT x
LET s=.0000001
FOR x=1 TO PI^2/6 STEP 0.0000001
LET d=s*f(x)
!PRINT x;f(x)
LET e=d-s*(f(x)-f(x+s))/2
LET c=c+e
NEXT x
PRINT c
EXTERNAL FUNCTION GAU(a,b) !http://6317.teacup.com/basic/bbs/3875
LET U=(B+A)/2
LET V=(B-A)/2
FOR I=1 TO 15
READ X,W
LET S=S+W*F(U+V*X)*V
NEXT I
LET GAU=S
!PRINT S
!PRINT LOG(B)
DATA -0.991455371120813,0.022935322010529
DATA -0.949107912342759,0.063092092629979
DATA -0.864864423359769,0.104790010322250
DATA -0.741531185599394,0.140653259715525
DATA -0.586087235467691,0.169004726639267
DATA -0.405845151377397,0.190350578064785
DATA -0.207784955007898,0.204432940075298
DATA 0.000000000000000,0.20948214108472
DATA 0.991455371120813,0.022935322010529
DATA 0.949107912342759,0.063092092629979
DATA 0.864864423359769,0.104790010322250
DATA 0.741531185599394,0.140653259715525
DATA 0.586087235467691,0.169004726639267
DATA 0.405845151377397,0.190350578064785
DATA 0.207784955007898,0.204432940075298
END FUNCTION
EXTERNAL FUNCTION WOOLHOUSE2(A,B)
LET H=(B-A)/28
LET X=A
LET WOOLHOUSE2=14*H*(7/195*(F(X)+F(X+28*H))+16807/66690*(F(X+2*H)+F(X+26*H))+128/285*(F(X+7*H)+F(X+21*H))+71/135*F(X+14*H))
END FUNCTION
! 自然対数
DEF f(x)=1/x
SET WINDOW -1,5,-1,5
DRAW grid
FOR x=0.01 TO 5 STEP 0.01
PLOT x,f(x);
NEXT x
SET AREA COLOR 2
FOR x=1 TO EXP(1) STEP 0.001
PLOT AREA:x,0;x,f(x);x,0
NEXT x
LET s=.0000001
FOR x=1 TO EXP(1) STEP 0.0000001
LET d=s*f(x)
!PRINT x;f(x)
LET e=d-s*(f(x)-f(x+s))/2
LET c=c+e
NEXT x
PRINT c
EXTERNAL FUNCTION GAU(a,b) !http://6317.teacup.com/basic/bbs/3875
LET U=(B+A)/2
LET V=(B-A)/2
FOR I=1 TO 15
READ X,W
LET S=S+W*F(U+V*X)*V
NEXT I
LET GAU=S
!PRINT S
!PRINT LOG(B)
DATA -0.991455371120813,0.022935322010529
DATA -0.949107912342759,0.063092092629979
DATA -0.864864423359769,0.104790010322250
DATA -0.741531185599394,0.140653259715525
DATA -0.586087235467691,0.169004726639267
DATA -0.405845151377397,0.190350578064785
DATA -0.207784955007898,0.204432940075298
DATA 0.000000000000000,0.20948214108472
DATA 0.991455371120813,0.022935322010529
DATA 0.949107912342759,0.063092092629979
DATA 0.864864423359769,0.104790010322250
DATA 0.741531185599394,0.140653259715525
DATA 0.586087235467691,0.169004726639267
DATA 0.405845151377397,0.190350578064785
DATA 0.207784955007898,0.204432940075298
END FUNCTION
EXTERNAL FUNCTION WOOLHOUSE2(A,B)
LET H=(B-A)/28
LET X=A
LET WOOLHOUSE2=14*H*(7/195*(F(X)+F(X+28*H))+16807/66690*(F(X+2*H)+F(X+26*H))+128/285*(F(X+7*H)+F(X+21*H))+71/135*F(X+14*H))
END FUNCTION
積分記号(せきぶんきごう、英語: Integral symbol)の後のln(x)dx、1/x dx は同じ事?
! 自然対数
DEF f(x)=1/x
SET WINDOW -1,5,-1,5
DRAW grid
FOR x=0.01 TO 5 STEP 0.01
PLOT x,f(x);
NEXT x
LET A=0.5
LET B=1
SET AREA COLOR 2
FOR x=A TO B STEP 0.001
PLOT AREA:x,0;x,f(x);x,0
NEXT x
LET s=.0000001
FOR x=A TO B STEP 0.0000001
LET d=s*f(x)
!PRINT x;f(x)
LET e=d-s*(f(x)-f(x+s))/2
LET c=c+e
NEXT x
PRINT c
EXTERNAL FUNCTION GAU(a,b) !http://6317.teacup.com/basic/bbs/3875
LET U=(B+A)/2
LET V=(B-A)/2
FOR I=1 TO 15
READ X,W
LET S=S+W*F(U+V*X)*V
NEXT I
LET GAU=S
!PRINT S
!PRINT LOG(B)
DATA -0.991455371120813,0.022935322010529
DATA -0.949107912342759,0.063092092629979
DATA -0.864864423359769,0.104790010322250
DATA -0.741531185599394,0.140653259715525
DATA -0.586087235467691,0.169004726639267
DATA -0.405845151377397,0.190350578064785
DATA -0.207784955007898,0.204432940075298
DATA 0.000000000000000,0.20948214108472
DATA 0.991455371120813,0.022935322010529
DATA 0.949107912342759,0.063092092629979
DATA 0.864864423359769,0.104790010322250
DATA 0.741531185599394,0.140653259715525
DATA 0.586087235467691,0.169004726639267
DATA 0.405845151377397,0.190350578064785
DATA 0.207784955007898,0.204432940075298
END FUNCTION
EXTERNAL FUNCTION WOOLHOUSE2(A,B)
LET H=(B-A)/28
LET X=A
LET WOOLHOUSE2=14*H*(7/195*(F(X)+F(X+28*H))+16807/66690*(F(X+2*H)+F(X+26*H))+128/285*(F(X+7*H)+F(X+21*H))+71/135*F(X+14*H))
END FUNCTION
SET bitmap SIZE 600,600
SET WINDOW -10,10,-10,10
20
CHARACTER INPUT A$
IF A$="i" THEN
CLEAR
DRAW grid
LET A=A+1
DRAW ao WITH SHIFT(0,A)
IF A=5 THEN GOTO 30
GOTO 20
END IF
PICTURE ao
SET COLOR 2
PLOT AREA:3,0;3,1;1,1;1,0
PLOT AREA:-1,0;-1,1;-3,1;-3,0
END PICTURE
30
END
-----------------------------
上から下へ
SET bitmap SIZE 600,600
SET WINDOW -10,10,-10,10
LET A=5
DO
CHARACTER INPUT A$
IF A$="i" THEN
CLEAR
DRAW grid0
LET A=A-1
DRAW ao WITH SHIFT(0,A)
END IF
LOOP UNTIL A=0
PICTURE ao
SET COLOR 2
PLOT AREA:3,0;3,1;1,1;1,0
PLOT AREA:-1,0;-1,1;-3,1;-3,0
END PICTURE
END
-----------------------------------------
応用して円板も入れた。
SET bitmap SIZE 600,600
SET WINDOW -10,10,-10,10
LET A=5
LET B=-5
DO
CHARACTER INPUT A$
IF A$="i" THEN
CLEAR
DRAW grid0
LET A=A-1
LET B=B+1
SET COLOR 3
DRAW disk WITH SCALE(1)*SHIFT(-2,B)
SET COLOR 4
DRAW disk WITH SCALE(1)*SHIFT(2,B)
DRAW ao WITH SHIFT(0,A)
END IF
LOOP UNTIL A=0
PICTURE ao
SET COLOR 2
PLOT AREA:3,0;3,1;1,1;1,0
PLOT AREA:-1,0;-1,1;-3,1;-3,0
END PICTURE
END
SET bitmap SIZE 600,600
SET WINDOW -10,10,-10,10
LET A=7
LET B=-8.35
10
DO
LET t1=TIME
IF MOD(IP(t1/10+ta),2)=0 THEN
LET ta=ta+1
CLEAR
DRAW grid0
LET A=A-1
LET B=B+1
SET COLOR 3
DRAW disk WITH SCALE(1)*SHIFT(SIN(b)*2,COS(b)*2)
SET COLOR 4
DRAW disk WITH SCALE(1)*SHIFT(COS(a)*2,SIN(a)*2)
DRAW ao WITH SHIFT(0,A)
GOTO 10
END IF
LOOP UNTIL A=0
PICTURE ao
SET COLOR 2
PLOT AREA:3,0;3,1;1,1;1,0
PLOT AREA:-1,0;-1,1;-3,1;-3,0
END PICTURE
END
--------------------------------------
SET bitmap SIZE 600,600
SET WINDOW -10,10,-10,10
LET A=10
10
DO
LET t1=TIME
IF MOD(IP(t1/ 0.5+ta),2)=0 THEN
LET ta=ta+1
CLEAR
DRAW grid
LET A=A-1
SET COLOR 2
DRAW ao WITH SHIFT(0,A)
SET COLOR 4
DRAW ao WITH SHIFT(0,A+1)
GOTO 10
END IF
LOOP UNTIL A=0
PICTURE ao
PLOT AREA:3,0;3,1;1,1;1,0
PLOT AREA:-1,0;-1,1;-3,1;-3,0
END PICTURE
END
----------------------------------------
SET bitmap SIZE 600,600
SET WINDOW -10,10,-10,10
LET A=10
10
DO
LET t1=TIME
IF MOD(IP(t1/ 0.5+ta),2)=0 THEN
LET ta=ta+1
CLEAR
DRAW grid
LET A=A-1
IF MOD(A,2)=0 THEN
SET COLOR 2
DRAW ao WITH SHIFT(0,A)
ELSE
SET COLOR 4
DRAW ao WITH SHIFT(0,A+1)
END IF
GOTO 10
END IF
LOOP UNTIL A=0
PICTURE ao
PLOT AREA:3,0;3,1;1,1;1,0
PLOT AREA:-1,0;-1,1;-3,1;-3,0
END PICTURE
END
------------------------------------
SET bitmap SIZE 600,600
SET WINDOW -10,10,-10,10
LET A=10
LET B=10
DO
LET t1=TIME
IF MOD(IP(t1/ 0.5+ta),2)=0 THEN
LET ta=ta+1
CLEAR
DRAW grid
LET A=A-1
IF A<0 THEN
LET B=B-1
SET COLOR 2
DRAW ao WITH SHIFT(0,0)
SET COLOR 4
DRAW ao WITH SHIFT(0,B)
ELSE
SET COLOR 2
DRAW ao WITH SHIFT(0,A)
END IF
END IF
LOOP UNTIL B<2
PICTURE ao
PLOT AREA:3,0;3,1;1,1;1,0
PLOT AREA:-1,0;-1,1;-3,1;-3,0
END PICTURE
END
--------------------------
ご依頼のタイプは3番目のプログラムだと思われます。
少し遊んで見ました。
SET bitmap SIZE 600,600
SET WINDOW -10,10,-10,10
LET A=10
LET B=10
LET C=10
DO
LET t1=TIME
IF MOD(IP(t1/ 0.5+ta),2)=0 THEN
LET ta=ta+1
CLEAR
DRAW grid
LET A=A-1
IF A<0 THEN
LET B=B-1
SET COLOR 2
DRAW ao WITH SHIFT(0,0)
SET COLOR 4
DRAW ao WITH SHIFT(0,B)
END IF
IF B<0 THEN
LET C=C-1
SET COLOR 2
DRAW ao WITH SHIFT(0,0)
SET COLOR 4
DRAW ao WITH SHIFT(0,1)
SET COLOR 3
DRAW ao WITH SHIFT(0,C)
ELSE
SET COLOR 2
DRAW ao WITH SHIFT(0,A)
END IF
END IF
LOOP UNTIL C=2
PICTURE ao
PLOT AREA:3,0;3,1;1,1;1,0
PLOT AREA:-1,0;-1,1;-3,1;-3,0
END PICTURE
SET bitmap SIZE 600,600
SET WINDOW -10,10,-10,10
LET A=10
LET B=10
10
DO
LET t1=TIME
IF MOD(IP(t1/ 0.5+ta),2)=0 THEN
SET DRAW MODE HIDDEN ! チラつき防止
LET ta=ta+1
CLEAR
DRAW grid
LET A=A-1
DRAW ao WITH SHIFT(0,A)
SET DRAW MODE EXPLICIT ! チラつき防止
! GOTO 10 この行は不要です
END IF
LOOP UNTIL A=0
20
DO
LET t1=TIME
IF MOD(IP(t1/ 0.5+ta),2)=0 THEN
SET DRAW MODE HIDDEN ! チラつき防止
LET ta=ta+1
CLEAR ! 画面消去
DRAW grid
DRAW ao WITH SHIFT(0,A) ! aoの再描画
LET B=B-1
DRAW aka WITH SHIFT(0,B)
SET DRAW MODE EXPLICIT ! チラつき防止
! GOTO 20 この行は不要です
END IF
LOOP UNTIL B=1
PICTURE ao
SET COLOR 2
PLOT AREA:3,0;3,1;1,1;1,0
PLOT AREA:-1,0;-1,1;-3,1;-3,0
END PICTURE
PICTURE aka
SET COLOR 4
PLOT AREA:3,0;3,1;1,1;1,0
PLOT AREA:-1,0;-1,1;-3,1;-3,0
END PICTURE
END
LET t0=TIME
SET bitmap SIZE 600,600
LET W=11
SET WINDOW -w,w,-w,w
SET TEXT FONT "MS ゴシック",20
LET A=11
DO
WAIT DELAY .5
LET t2=t2+1
LET A=A-1
SET AREA COLOR 1
PLOT AREA:-W,-W;-W,W;W,W;W,-W
IF MOD(A,2)=0 THEN
LET t1=t1+1
SET COLOR 6
DRAW ao WITH SHIFT(0,A)
SET TEXT COLOR 5
PLOT TEXT ,AT -.2, A: STR$(ABS(A))
PLOT TEXT ,AT -7, -7: STR$(t1-1)
ELSE
SET COLOR 5
DRAW ao WITH SHIFT(0,A)
SET TEXT COLOR 6
PLOT TEXT ,AT -.2, A: STR$(ABS(A))
PLOT TEXT ,AT -7, -7: STR$(t1-1)
END IF
IF A<-9 THEN
LET A=11
LET B=B+1
END IF
LOOP UNTIL t2=>120-4
PICTURE ao
PLOT AREA:3,0;3,1;1,1;1,0
PLOT AREA:-1,0;-1,1;-3,1;-3,0
END PICTURE
LET TM=TIME-t0
PRINT USING"####." & REPEAT$("#",2):TM;
PRINT "秒"
END
本当はアナログ時計にしたかったのですが、私の力不足です。
後で気になって、
DECLARE EXTERNAL SUB Analog
OPTION ANGLE DEGREES
LET t0=TIME
CALL Analog(360)
LET TM=TIME-t0
PRINT USING"####." & REPEAT$("#",2):TM;
PRINT "秒"
END
EXTERNAL SUB Analog (t3)
OPTION ANGLE DEGREES
SET bitmap SIZE 600,600
LET W=15
SET WINDOW -w,w,-w,w
SET TEXT FONT "MS ゴシック",40
LET B=0
DO
SET DRAW MODE HIDDEN
WAIT DELAY .98
SET COLOR 2
DRAW disk WITH SCALE(12)*SHIFT(0,0)
SET COLOR 0
DRAW disk WITH SCALE(11)*SHIFT(0,0)
! DRAW GRID0
SET COLOR 2
PLOT TEXT ,AT -1.4,8: STR$(12)
PLOT TEXT ,AT 8.5,-1.5: STR$(3)
PLOT TEXT ,AT -.85,-11: STR$(6)
PLOT TEXT ,AT -10.5,-1.5: STR$(9)
! PLOT TEXT ,AT -1.3,-1.5: STR$(b/6+1)
LET B=B+6
SET COLOR 3
DRAW disk WITH SCALE(.5)*SHIFT(SIN(b)*7,COS(b)*7)
SET DRAW MODE EXPLICIT
LOOP UNTIL B=>t3
END SUB
! K=399998 Ver.2
DECLARE EXTERNAL FUNCTION ISPRIME
DECLARE EXTERNAL FUNCTION POWMOD
OPTION ARITHMETIC RATIONAL
PRINT DATE$;"/"; TIME$
LET k9=399998 !素数の個数
DIM A(k9+1)
OPEN #2: NAME "PRIME_400001.txt" ,ACCESS INPUT
FOR i=1 TO k9+1
INPUT #2: A(i)
NEXT i
CLOSE #2
LET X=1 !分子
LET Y=1 !分母
FOR i=1 TO K9
LET X=X*(A(i)-1) !1,2,4,6,10,12,16,18,…
LET Y=Y*A(i) !2,3,5,7,11,13,17,19,…
! PRINT i;x/y
NEXT i
LET START=A(K9)^2 !5800049(399998th prime)
LET STOPT=A(K9+1)^2-1 !5800057(399999th prime)
LET prime=1117217274291 !33640568402401 (1117217274291st prime)
LET SERIES=x/y
LET x1=NUMER(SERIES) !分子
LET y1=DENOM(SERIES) !分母
LET z=(prime-(START*x1/y1+k9-1))*y1
!PRINT z
LET g=y1-x1
LET S=z !DATA初項
OPEN #1:NAME "k_"&STR$(1)&".txt",RECTYPE INTERNAL
ERASE #1
LET J1=1
LET cc=0
PRINT DATE$;"/"; TIME$;"出力"
FOR N=START+1 TO STOPT+1
IF cc>=1E6*J1 THEN
PRINT "J1=";J1;DATE$;"/"; TIME$
CLOSE #1
LET J1=J1+1
OPEN #1:NAME "k_"&STR$(J1)&".txt",RECTYPE INTERNAL
END IF
LET pn=((n-1)*x1+S)/y1+k9-1
WRITE #1:(n-1),pn
IF ISPRIME(N)=1 THEN
LET S=S+g
ELSE
LET S=S-x1
END IF
LET cc=cc+1
NEXT N
CLOSE #1
PRINT DATE$;"/"; TIME$
END
EXTERNAL FUNCTION ISPRIME(N)
OPTION ARITHMETIC RATIONAL
IF N=2 THEN
LET ISPRIME=1
EXIT FUNCTION
END IF
IF N = 1 OR MOD(N,2)=0 THEN
LET ISPRIME=0
EXIT FUNCTION
END IF
LET D=(N-1)/2
LET S=0
DO WHILE MOD(D,2)=0
LET D=INT(D/2)
LET S=S+1
LOOP
FOR I=1 TO 7
LET ISP=0
READ A !' n < 341550071728321 なら a = 2, 3, 5, 7, 11, 13, 17
DATA 2,3,5,7,11,13,17
LET ISP=0
LET R=POWMOD(A,D,N)
IF R=1 OR R=N-1 THEN
LET ISP=1
END IF
LET R=POWMOD(R,2,N)
FOR J=0 TO S-1
IF R=N-1 THEN
LET ISP=1
END IF
LET R=POWMOD(R,2,N)
NEXT J
IF ISP=0 THEN
LET ISPRIME=0
EXIT FUNCTION
END IF
NEXT I
LET ISPRIME=1
END FUNCTION
EXTERNAL FUNCTION POWMOD(B,P,M)
OPTION ARITHMETIC RATIONAL
LET RESULT=1
DO WHILE P>0
IF MOD(P,2)=1 THEN
LET RESULT=MOD(RESULT*B,M)
END IF
LET B=MOD(B*B,M)
LET P=INT(P/2)
LOOP
LET POWMOD=RESULT
END FUNCTION
> 実行時内部エラーの報告 Version7.77
>
> (仮称)十進BASIC Version7.77
>
> --------------------------------------------
>
> ! K=399998 Ver.2
> DECLARE EXTERNAL FUNCTION ISPRIME
> DECLARE EXTERNAL FUNCTION POWMOD
> OPTION ARITHMETIC RATIONAL
> PRINT DATE$;"/"; TIME$
> LET k9=399998 !素数の個数
> DIM A(k9+1)
> OPEN #2: NAME "PRIME_400001.txt" ,ACCESS INPUT
> FOR i=1 TO k9+1
> INPUT #2: A(i)
> NEXT i
> CLOSE #2
>
> LET X=1 !分子
> LET Y=1 !分母
> FOR i=1 TO K9
> LET X=X*(A(i)-1) !1,2,4,6,10,12,16,18,…
> LET Y=Y*A(i) !2,3,5,7,11,13,17,19,…
> ! PRINT i;x/y
> NEXT i
>
> LET START=A(K9)^2 !5800049(399998th prime)
> LET STOPT=A(K9+1)^2-1 !5800057(399999th prime)
> LET prime=1117217274291 !33640568402401 (1117217274291st prime)
>
> LET SERIES=x/y
> LET x1=NUMER(SERIES) !分子
> LET y1=DENOM(SERIES) !分母
> LET z=(prime-(START*x1/y1+k9-1))*y1
> !PRINT z
> LET g=y1-x1
>
> LET S=z !DATA初項
> OPEN #1:NAME "k_"&STR$(1)&".txt",RECTYPE INTERNAL
> ERASE #1
> LET J1=1
> LET cc=0
> PRINT DATE$;"/"; TIME$;"出力"
>
> FOR N=START+1 TO STOPT+1
> IF cc>=1E6*J1 THEN
> PRINT "J1=";J1;DATE$;"/"; TIME$
> CLOSE #1
> LET J1=J1+1
> OPEN #1:NAME "k_"&STR$(J1)&".txt",RECTYPE INTERNAL
> END IF
>
> LET pn=((n-1)*x1+S)/y1+k9-1
> WRITE #1:(n-1),pn
> IF ISPRIME(N)=1 THEN
> LET S=S+g
> ELSE
> LET S=S-x1
> END IF
> LET cc=cc+1
> NEXT N
> CLOSE #1
> PRINT DATE$;"/"; TIME$
> END
>
> EXTERNAL FUNCTION ISPRIME(N)
> OPTION ARITHMETIC RATIONAL
> IF N=2 THEN
> LET ISPRIME=1
> EXIT FUNCTION
> END IF
> IF N = 1 OR MOD(N,2)=0 THEN
> LET ISPRIME=0
> EXIT FUNCTION
> END IF
> LET D=(N-1)/2
> LET S=0
> DO WHILE MOD(D,2)=0
> LET D=INT(D/2)
> LET S=S+1
> LOOP
> FOR I=1 TO 7
> LET ISP=0
> READ A !' n < 341550071728321 なら a = 2, 3, 5, 7, 11, 13, 17
> DATA 2,3,5,7,11,13,17
> LET ISP=0
> LET R=POWMOD(A,D,N)
> IF R=1 OR R=N-1 THEN
> LET ISP=1
> END IF
> LET R=POWMOD(R,2,N)
> FOR J=0 TO S-1
> IF R=N-1 THEN
> LET ISP=1
> END IF
> LET R=POWMOD(R,2,N)
> NEXT J
> IF ISP=0 THEN
> LET ISPRIME=0
> EXIT FUNCTION
> END IF
> NEXT I
> LET ISPRIME=1
> END FUNCTION
>
> EXTERNAL FUNCTION POWMOD(B,P,M)
> OPTION ARITHMETIC RATIONAL
> LET RESULT=1
> DO WHILE P>0
> IF MOD(P,2)=1 THEN
> LET RESULT=MOD(RESULT*B,M)
> END IF
> LET B=MOD(B*B,M)
> LET P=INT(P/2)
> LOOP
> LET POWMOD=RESULT
> END FUNCTION
>
> ---------------------------
>
> K=399998 エラー発生後 計算中の
>
> K=500000 PnからP(n+1)^2-1 素数の個数を求めるプログラム動作報告2
>
> http://blogs.yahoo.co.jp/donald_stinger/15342970.html
>
>
> K=300000 は無事 計算完了しました。
>
! 素数リスト作成プログラム
OPTION ARITHMETIC NATIVE !2進モード
ASK DIRECTORY d$
LET f_name1$="prime_500001" ! ファイル名
LET f1$=d$&"\"&f_name1$&".txt"
PRINT "ファイル保存場所[1] = ";f1$
OPEN #1: NAME f1$
ERASE #1
LET t0=TIME
PRINT #1:2 ! 素数2をプリント
!エラトステネスの奇数列篩
LET k7=7368791
DIM P(k7)
LET h1=2
FOR n1=3 TO k7 STEP 2
IF P(n1)=0 THEN
PRINT #1:n1 ! 素数3からをプリント
LET h1=h1+1
END IF
FOR k1=n1 TO k7 STEP 2
LET m1=n1*k1
IF m1>k7 THEN GOTO 10
LET P(m1)=1
NEXT k1
10 NEXT n1
CLOSE #1
PRINT TIME-t0;"秒で計算しました"
END
-----------------------------------------
! K=300000 Ver.2.1
DECLARE EXTERNAL FUNCTION ISPRIME
DECLARE EXTERNAL FUNCTION POWMOD
OPTION ARITHMETIC RATIONAL
PRINT "K=300000"
PRINT DATE$;"/"; TIME$
LET k9=300000 !素数の個数
DIM A(k9+1)
OPEN #2: NAME "PRIME_300001.txt" ,ACCESS INPUT
FOR i=1 TO k9+1
INPUT #2: A(i)
NEXT i
CLOSE #2
LET X=1 !分子
LET Y=1 !分母
FOR i=1 TO K9
LET X=X*(A(i)-1) !1,2,4,6,10,12,16,18,…
LET Y=Y*A(i) !2,3,5,7,11,13,17,19,…
NEXT i
LET START=A(K9)^2 !4256233(300000th prime)
LET STOPT=A(K9+1)^2-1 !4256249(300001st prime)
LET prime=614267441903 !18115519350289 (614267441903rd prime)
LET SERIES=x/y
LET x1=NUMER(SERIES) !分子
LET y1=DENOM(SERIES) !分母
LET S=(prime-(START*x1/y1+k9-1))*y1 !DATA初項
LET g=y1-x1
OPEN #1:NAME "k_"&STR$(1)&".txt",RECTYPE INTERNAL
ERASE #1
LET J1=1
PRINT DATE$;"/"; TIME$;"出力"
FOR N=START+1 TO STOPT+1
IF cc>=1E6*J1 THEN
PRINT "J1=";J1;DATE$;"/"; TIME$
CLOSE #1
LET J1=J1+1
OPEN #1:NAME "k_"&STR$(J1)&".txt",RECTYPE INTERNAL
END IF
LET pn=((n-1)*x1+S)/y1+k9-1
WRITE #1:(n-1),pn
IF ISPRIME(N)=1 THEN
LET S=S+g
ELSE
LET S=S-x1
END IF
LET cc=cc+1
NEXT N
CLOSE #1
PRINT DATE$;"/"; TIME$
END
EXTERNAL FUNCTION ISPRIME(N)
OPTION ARITHMETIC RATIONAL
IF N=2 THEN
LET ISPRIME=1
EXIT FUNCTION
END IF
IF N = 1 OR MOD(N,2)=0 THEN
LET ISPRIME=0
EXIT FUNCTION
END IF
LET D=(N-1)/2
LET S=0
DO WHILE MOD(D,2)=0
LET D=INT(D/2)
LET S=S+1
LOOP
FOR I=1 TO 7
LET ISP=0
READ A !' n < 341550071728321 なら a = 2, 3, 5, 7, 11, 13, 17
DATA 2,3,5,7,11,13,17
LET ISP=0
LET R=POWMOD(A,D,N)
IF R=1 OR R=N-1 THEN
LET ISP=1
END IF
LET R=POWMOD(R,2,N)
FOR J=0 TO S-1
IF R=N-1 THEN
LET ISP=1
END IF
LET R=POWMOD(R,2,N)
NEXT J
IF ISP=0 THEN
LET ISPRIME=0
EXIT FUNCTION
END IF
NEXT I
LET ISPRIME=1
END FUNCTION
EXTERNAL FUNCTION POWMOD(B,P,M)
OPTION ARITHMETIC RATIONAL
LET RESULT=1
DO WHILE P>0
IF MOD(P,2)=1 THEN
LET RESULT=MOD(RESULT*B,M)
END IF
LET B=MOD(B*B,M)
LET P=INT(P/2)
LOOP
LET POWMOD=RESULT
END FUNCTION
------------------------------------
! K=500000
! k=x s=係数(DATA) Ver 3.1
! 素数の個数 π(x)=(n*x+S)/y+k-1
DECLARE EXTERNAL FUNCTION ISPRIME
DECLARE EXTERNAL FUNCTION POWMOD
OPTION ARITHMETIC RATIONAL
PRINT DATE$;"/"; TIME$;" ";"k=500000"
LET t0=TIME
LET k9=5E5 !素数の個数(1から)
DIM A(k9+1)
OPEN #2: NAME "c:\prime_1E8.txt" ,ACCESS INPUT
FOR i=1 TO k9+1
INPUT #2: A(i)
NEXT i
CLOSE #2
20 LET X=1 !分子
LET Y=1 !分母
FOR i=1 TO K9
LET X=X*(A(i)-1) !1,2,4,6,10,12,16,18,…
LET Y=Y*A(i) !2,3,5,7,11,13,17,19,…
! PRINT i;x/y
NEXT i
LET START=A(K9)^2 !7368787(500000th prime)
LET STOPT=A(K9+1)^2-1 !7368791(500001st prime)
LET prime=1775034096424 !54299021851369 (1775034096424)
LET SERIES=x/y
LET x1=NUMER(SERIES) !分子
LET y1=DENOM(SERIES) !分母
LET S=(prime-(START*x1/y1+k9-1))*y1 !DATA初項
OPEN #1:NAME "k_"&STR$(1)&".txt",RECTYPE INTERNAL
ERASE #1
LET J1=1
PRINT DATE$;"/"; TIME$;"出力"
LET TM=TIME-t0
PRINT USING"#########." & REPEAT$("#",2):TM;
PRINT "秒"
LET N=START
DO WHILE N < STOPT+1
IF cc>=1E5*J1 THEN
PRINT "J1=";J1;DATE$;"/"; TIME$
CLOSE #1
LET J1=J1+1
OPEN #1:NAME "k_"&STR$(J1)&".txt",RECTYPE INTERNAL
END IF
LET pn=(n*x1+S)/y1+k9-1
WRITE #1:n,pn
LET S=S-x1
IF ISPRIME(N+1)=1 THEN LET S=S+y1
LET cc=cc+1
LET N=N+1
LOOP
CLOSE #1
PRINT DATE$;"/"; TIME$
END
EXTERNAL FUNCTION ISPRIME(N)
OPTION ARITHMETIC RATIONAL
IF N=2 OR N=3 OR N=5 OR N=7 OR N=11 OR N=13 OR N=17 THEN
LET ISPRIME=1
EXIT FUNCTION
END IF
IF N=1 OR MOD(N,2)=0 THEN
LET ISPRIME=0
EXIT FUNCTION
END IF
LET D=(N-1)/2
LET S=0
DO WHILE MOD(D, 2)=0
LET D=INT(D/2)
LET S=S+1
LOOP
FOR I=1 TO 7
LET ISP=0
READ A !' n < 341550071728321 なら a=2,3,5,7,11,13,17
DATA 2,3,5,7,11,13,17
LET ISP=0
LET R=POWMOD(A,D,N)
IF R=1 OR R=N-1 THEN
LET ISP=1
END IF
LET R=POWMOD(R,2,N)
FOR J=0 TO S-1
IF R=N-1 THEN
LET ISP=1
END IF
LET R=POWMOD(R,2,N)
NEXT J
IF ISP=0 THEN
LET ISPRIME=0
EXIT FUNCTION
END IF
NEXT I
LET ISPRIME=1
END FUNCTION
EXTERNAL FUNCTION POWMOD(B,P,M)
OPTION ARITHMETIC RATIONAL
LET RESULT=1
DO WHILE P>0
IF MOD(P,2)=1 THEN
LET RESULT=MOD(RESULT*B,M)
END IF
LET B=MOD(B*B,M)
LET P=INT(P/2)
LOOP
LET POWMOD=RESULT
END FUNCTION
--------------------------------------------
! Sieve of Sundaram Prime number list 素数1000000個、1E6 単位 1000億
DECLARE EXTERNAL SUB Sieve
OPTION ARITHMETIC NATIVE
LET t0=TIME
LET k6=8238
DIM A1(k6),A2(k6)
OPEN #2:NAME "1E6v4119.TXT",ACCESS INPUT
FOR i=1 TO k6
IF MOD(i,2)=1 THEN
LET c8=c8+1
INPUT #2: A1(c8)
ELSE
LET c9=c9+1
INPUT #2: A2(c9)
END IF
NEXT i
CLOSE #2
FOR hi=2 TO k6/2
LET JJ=hi
LET JT=hi+1
LET k8=A1(hi)
LET k9=A2(hi)
LET C1=(JJ-1)*1E6
CALL Sieve(JJ,k8,k9,c1,JT)
NEXT hi
LET TM=TIME-t0
PRINT USING"######." & REPEAT$("#",2):TM;
PRINT "秒"
END
EXTERNAL SUB Sieve(JJ,k8,k9,c1,JT)
OPTION ARITHMETIC NATIVE
OPEN #1:NAME "C:\prime10\prime_"&STR$(JJ)&".txt",RECTYPE INTERNAL
ERASE #1
!IF C1=1 THEN WRITE #1:2,1
LET k8=(k8-1)/2
LET M7=k8-1
LET k9=(k9+1)/2
DIM A(k9-M7)
MAT A=ZER
LET S=3
LET D=4
LET k=INT(SQR(k9))*3
!LET cf=0
DO
LET B=D+S*INT((k8-D)/S) !ここが改良のポイント
DO UNTIL B>=k8
LET B=B+S
LOOP
FOR I=B TO k9 STEP S
!LET cf=cf+1
LET A(I-M7)=1
NEXT I
LET S=S+2
LET D=D+3
LOOP UNTIL D>k
!PRINT cf
PRINT "【";STR$(jj)&"】"
LET dd=1
FOR n=1 TO k9-M7
IF A(n)=0 THEN
LET C=C+1
LET cc=c+c1
LET Sundaram=(n+M7)*2+1
IF cc=1E6*jj+1 THEN
CLOSE #1
LET jj=jj+1
IF jj=JT THEN GOTO 30
PRINT "【";STR$(jj)&"】";TAB(10);Sundaram;":";cc
OPEN #1:NAME "C:prime10\prime_"&STR$(jj)&".txt",RECTYPE INTERNAL
END IF
WRITE #1:Sundaram !,cc
IF c=1 THEN PRINT TAB(8);Sundaram;":";cc
IF c=1E6*dd THEN
PRINT TAB(8);Sundaram;":";cc
LET dd=dd+1
END IF
END IF
NEXT n
CLOSE #1
30
END SUB
-------------------------------------------------
> たろささんへのお返事です。
>
> > 円周率小数点以下30万桁の一致を目視で確かめるのは大変なので
> > 0から9の個数を数えました。30万桁までの一致を確認
>
> 数字をカウントするだけなら下記のプログラムで十分かと思います。
>
> DIM COUNT(0 TO 9)
> FILE GETNAME F$,"ファイル|*.*"
> IF F$="" THEN STOP
> OPEN #1:NAME F$
> DO
> CHARACTER INPUT #1,IF MISSING THEN EXIT DO:A$
> IF A$>="0" AND A$<="9" THEN
> LET NUM=NUM+1
> LET P=VAL(A$)
> LET COUNT(P)=COUNT(P)+1
> !'IF NUM>1000000 THEN EXIT DO
> END IF
> LOOP
> CLOSE #1
> FOR I=0 TO 9
> PRINT I;":";COUNT(I)
> LET SUM=SUM+COUNT(I)
> NEXT I
> PRINT "SUM:";SUM
> END
>
オンライン整数列大辞典
[A058303] http://oeis.org/A058303
Decimal expansion of imaginary part of first nontrivial zero of Riemann zeta function.
[LINKS]
Fredrik Johansson, The first nontrivial zero to over 300000 decimal digits
LET k=1000
LET k2=168
DIM P(k)
DIM A(k2)
SET WINDOW 460,480,-11,11 !x,y
DRAW grid0(1,1)
SET TEXT FONT "MS ゴシック",15
CALL prime(k)
SET POINT STYLE 7
FOR x=1 TO k/2
SET TEXT COLOR 2
PLOT TEXT ,AT x-.4,-.3 :STR$(x)
NEXT x
PRINT A(30);A(31)^2-1
FOR x=0 TO 800 STEP 0.01
FOR Cr=1 TO 30
SET POINT COLOR Cr+1
PLOT POINTS:x/PI*A(Cr),SIN(x)*A(Cr)
NEXT Cr
NEXT x
FOR x=1 TO k2
SET TEXT COLOR 4
PLOT TEXT ,AT A(x)-.4,-.3 :STR$(A(x))
NEXT x
SUB prime(v) !エラトステネスの奇数列篩
LET k9=v
LET h1=1
LET A(h1)=2
LET h1=2
FOR n1=3 TO k9 STEP 2
IF P(n1)=0 THEN
LET A(h1)=n1
LET h1=h1+1
IF h1>k9+1 THEN GOTO 20
END IF
FOR k1=n1 TO k9 STEP 2
LET m1=n1*k1
IF m1>k9 THEN GOTO 10
LET P(m1)=1
NEXT k1
10 NEXT n1
20
END SUB
END
LET k=1000
LET k2=168
DIM P(k)
DIM A(k2)
SET BITMAP SIZE 640*5+1,641 ! x軸方向にデフォルトの5倍拡張
SET WINDOW 460-40,480+40,-11,11 !x,y
DRAW grid0(1,1)
SET TEXT FONT "MS ゴシック",15
(以下略)
> たろささんへのお返事です。
>
> >CADの様に x軸方向に横スクロール出来たらいいなと思いました。
>
> CADは知らないのですが、十進BASICでもグラフィックス画面の画素数を再設定することでスクロールさせることはできますよ。
> グラフィックス画面の画素数はデフォルトでは641×641ですが、次のようにして変更することができます。
> 難点は、水平スクロールバーが描画領域内に設置されるため、その幅のぶん縦方向の描画領域がけずられ垂直スクロールバーも設置されてしまうことです。
>
> LET k=1000
> LET k2=168
> DIM P(k)
> DIM A(k2)
> SET BITMAP SIZE 640*5+1,641 ! x軸方向にデフォルトの5倍拡張
> SET WINDOW 460-40,480+40,-11,11 !x,y
> DRAW grid0(1,1)
> SET TEXT FONT "MS ゴシック",15
> (以下略)
ありがとうございます。
OPTION ARITHMETIC NATIVE !2進モード
LET k=1010
LET k2=169
DIM P(k)
DIM A(k2)
SET BITMAP SIZE 640*63+1,641 ! x軸方向にデフォルトの5倍拡張
SET WINDOW 0,k,-11,11 !16*x,y
DRAW grid0(1,1)
SET TEXT FONT "MS ゴシック",13
CALL prime(k)
SET POINT STYLE 1
FOR x=1 TO k
SET TEXT COLOR 2
PLOT TEXT ,AT x-.4,-.3 :STR$(x)
NEXT x
PRINT A(30);A(31)^2-1
FOR x=0 TO 1600 STEP 0.01
FOR Cr=1 TO 30
!RANDOMIZE
!LET nr=1+INT(4*RND)
SET POINT COLOR 1+Cr
PLOT POINTS:x/PI*A(Cr),SIN(x)*A(Cr)
NEXT Cr
NEXT x
FOR x=1 TO k2
SET TEXT COLOR 4
PLOT TEXT ,AT A(x)-.4,-.3 :STR$(A(x))
NEXT x
SUB prime(v) !エラトステネスの奇数列篩
LET k9=v
LET h1=1
LET A(h1)=2
LET h1=2
FOR n1=3 TO k9 STEP 2
IF P(n1)=0 THEN
LET A(h1)=n1
LET h1=h1+1
IF h1>k9+1 THEN GOTO 20
END IF
FOR k1=n1 TO k9 STEP 2
LET m1=n1*k1
IF m1>k9 THEN GOTO 10
LET P(m1)=1
NEXT k1
10 NEXT n1
20
END SUB
END
DECLARE EXTERNAL FUNCTION SIN
DECLARE EXTERNAL FUNCTION cos
DECLARE EXTERNAL FUNCTION TAN
OPTION ARITHMETIC DECIMAL_HIGH
SET BITMAP SIZE 640*2+1,640*2+1 ! x,y軸方向にデフォルトの2倍拡張
SET WINDOW -21,21,-150,150 !x,y
DRAW grid(1,10)
SET LINE COLOR 2
FOR x=-21 TO 21 STEP .1
LET f=x/PI*x-TAN(x)*x
PLOT LINES:x,f;
NEXT x
LET x=PI/2
PRINT x/PI*x-TAN(x)*x
PRINT STR$(PI)
PRINT TAN(PI/2)
END
! 1000桁モードで利用する正弦,余弦,正接関数
EXTERNAL FUNCTION sin(x)
DECLARE EXTERNAL FUNCTION cos
OPTION ARITHMETIC DECIMAL_HIGH
IF x<0 THEN
LET sin=-sin(-x)
ELSEIF x>2*PI THEN
LET sin=sin(MOD(x,2*PI))
ELSEIF x>PI THEN
LET sin=-sin(x-PI)
ELSEIF x>PI/2 THEN
LET sin=sin(PI-x)
ELSEIF x>PI/4 THEN
LET sin=cos(PI/2-x)
ELSE ! マクローリン級数による近似
LET y=x
LET n=0
LET t=y
DO
LET y0=y
LET n=n+1
LET t=-t*x^2/((2*n)*(2*n+1))
LET y=y+t
LOOP UNTIL y0=y
LET sin=y
END IF
END FUNCTION
!
EXTERNAL FUNCTION cos(x)
DECLARE EXTERNAL FUNCTION sin
OPTION ARITHMETIC DECIMAL_HIGH
IF x<0 THEN
LET cos=cos(-x)
ELSEIF x>2*PI THEN
LET cos=cos(MOD(x,2*PI))
ELSEIF x>PI THEN
LET cos=-cos(x-PI)
ELSEIF x>PI/2 THEN
LET cos=-cos(PI-x)
ELSEIF x>PI/4 THEN
LET cos=sin(PI/2-x)
ELSE ! マクローリン級数による近似
LET y=1
LET n=0
LET t=y
DO
LET y0=y
LET n=n+1
LET t=-t*x^2/((2*n-1)*(2*n))
LET y=y+t
LOOP UNTIL y0=y
LET cos=y
END IF
END FUNCTION
!
EXTERNAL FUNCTION tan(x)
DECLARE EXTERNAL FUNCTION sin,cos
OPTION ARITHMETIC DECIMAL_HIGH
LET tan=sin(x)/cos(x)
END FUNCTION
DECLARE EXTERNAL FUNCTION SIN
DECLARE EXTERNAL FUNCTION cos
DECLARE EXTERNAL FUNCTION TAN
DECLARE EXTERNAL FUNCTION sn
LET x=1.57
FOR i=2 TO 55
PRINT sn(i,x)
LET x=sn(i,x)
NEXT i
END
EXTERNAL FUNCTION sn(i,x)
DECLARE EXTERNAL FUNCTION cos
DECLARE EXTERNAL FUNCTION SIN
DECLARE EXTERNAL FUNCTION TAN
DEF f(x)=x/PI*x-TAN(x)*x
LET S=i
LET s1=1/10^(i-1)
LET s2=1/10^s
LET t1=x-s1
LET t2=x
FOR x=t1 TO t2 STEP s2
! PRINT f(x)
IF f(x)>1 THEN EXIT FOR
NEXT x
LET sn=x
END FUNCTION
! 1000桁モードで利用する正弦,余弦,正接関数
EXTERNAL FUNCTION sin(x)
DECLARE EXTERNAL FUNCTION cos
IF x<0 THEN
LET sin=-sin(-x)
ELSEIF x>2*PI THEN
LET sin=sin(MOD(x,2*PI))
ELSEIF x>PI THEN
LET sin=-sin(x-PI)
ELSEIF x>PI/2 THEN
LET sin=sin(PI-x)
ELSEIF x>PI/4 THEN
LET sin=cos(PI/2-x)
ELSE ! マクローリン級数による近似
LET y=x
LET n=0
LET t=y
DO
LET y0=y
LET n=n+1
LET t=-t*x^2/((2*n)*(2*n+1))
LET y=y+t
LOOP UNTIL y0=y
LET sin=y
END IF
END FUNCTION
!
EXTERNAL FUNCTION cos(x)
DECLARE EXTERNAL FUNCTION sin
IF x<0 THEN
LET cos=cos(-x)
ELSEIF x>2*PI THEN
LET cos=cos(MOD(x,2*PI))
ELSEIF x>PI THEN
LET cos=-cos(x-PI)
ELSEIF x>PI/2 THEN
LET cos=-cos(PI-x)
ELSEIF x>PI/4 THEN
LET cos=sin(PI/2-x)
ELSE ! マクローリン級数による近似
LET y=1
LET n=0
LET t=y
DO
LET y0=y
LET n=n+1
LET t=-t*x^2/((2*n-1)*(2*n))
LET y=y+t
LOOP UNTIL y0=y
LET cos=y
END IF
END FUNCTION
!
EXTERNAL FUNCTION tan(x)
DECLARE EXTERNAL FUNCTION sin,cos
LET tan=sin(x)/cos(x)
END FUNCTION
BASIC Accelerator Version 0.9.8.0
----------------------------------------
1億まで
----------------------------------------
!Sieve of Sundaram
DECLARE EXTERNAL FUNCTION cut
OPTION ARITHMETIC NATIVE !2進モード
LET k6=5761455
DIM Ba(k6)
DIM Pa(9)
LET t0=TIME
LET k9=1E8/2
DIM A(k9)
FOR i=1 TO SQR(k9)
FOR j=i TO INT(k9/3)
LET S=i+j+2*i*j
IF s>k9 THEN GOTO 10
LET A(S)=1
NEXT j
10 NEXT i
LET Ba(1)=2
LET C=1
FOR n=1 TO k9
IF A(n)=0 THEN
LET C=C+1
LET Ba(c)=n*2+1
END IF
NEXT n
FOR n=1 TO k6
LET m4=Ba(n)
LET p4=cut(m4)
LET PA(p4)=PA(p4)+1
NEXT n
FOR n=1 TO 9
IF PA(n)<>0 THEN
PRINT n;":";PA(n)
LET z=z+PA(n)
END IF
NEXT n
PRINT z
LET TM=TIME-t0
PRINT USING"####." & REPEAT$("#",2):TM;
PRINT "秒"
END
EXTERNAL FUNCTION cut(m)
OPTION ARITHMETIC NATIVE
LET a$=""&STR$(m)
LET L=LEN(a$)
LET L1= VAL(MID$(a$,L,L))
LET cut=L1
END FUNCTION
----------------------------------------
1億から2億まで
----------------------------------------
!http://6317.teacup.com/basic/bbs/3978
!Re: Sieve of Sundaram サンダラムの篩(ふるい) 投稿者:nagram 様
!Sieve of Sundaram PBA
DECLARE EXTERNAL FUNCTION cut
OPTION ARITHMETIC NATIVE !2進モード
LET k6=5317482 !5761455
DIM Ba(k6)
DIM Pa(9)
LET t0=TIME
LET M=1E8/2 !素数 最小値
LET W=M-1
LET N=2E8/2 !素数 最大値
LET C=5761455 !1E8,(5761455th prime)
DIM A(1 TO N-W)
MAT A=ZER
LET S=3
LET D=4
LET k=INT(SQR(N))*3
DO
LET B=D+S*INT((M-D)/S) !ここが改良のポイント
DO UNTIL B>=M
LET B=B+S
LOOP
FOR I=B TO N STEP S
LET A(I-W)=1
NEXT I
LET S=S+2
LET D=D+3
LOOP UNTIL D>k
FOR n=1 TO N-W
IF A(n)=0 THEN
LET n1=n+W
LET C=C+1
LET CC=CC+1
LET Sundaram=n1*2+1
!PRINT c;":";Sundaram
LET Ba(cc)=Sundaram
END IF
NEXT n
FOR n=1 TO k6
LET m4=Ba(n)
LET p4=cut(m4)
LET PA(p4)=PA(p4)+1
NEXT n
FOR n=1 TO 9
IF PA(n)<>0 THEN
PRINT n;":";PA(n)
LET z=z+PA(n)
END IF
NEXT n
PRINT z
LET TM=TIME-t0
PRINT USING"####." & REPEAT$("#",2):TM;
PRINT "秒"
END
EXTERNAL FUNCTION cut(m)
OPTION ARITHMETIC NATIVE
LET a$=""&STR$(m)
LET L=LEN(a$)
LET L1= VAL(MID$(a$,L,L))
LET cut=L1
END FUNCTION
----------------------------------------
乱数 計算の度に数値が変化します。
----------------------------------------
DIM A(4)
RANDOMIZE
FOR t=1 TO 5761455-2
LET n=1+IP(4*RND)
LET A(n)=A(n)+1
! PRINT n
NEXT t
!Sieve of Sundaram
DECLARE EXTERNAL FUNCTION cut
OPTION ARITHMETIC NATIVE !2進モード
LET k6=9592 !5761455
DIM Ba(k6)
DIM Pa(100)
LET t0=TIME
LET k9=1E5/2 !1E8/2
DIM A(k9)
FOR i=1 TO SQR(k9)
FOR j=i TO INT(k9/3)
LET S=i+j+2*i*j
IF s>k9 THEN GOTO 10
LET A(S)=1
NEXT j
10 NEXT i
LET Ba(1)=2
LET C=1
FOR n=1 TO k9
IF A(n)=0 THEN
LET C=C+1
LET Ba(c)=n*2+1
END IF
NEXT n
FOR n=26 TO k6
LET m4=Ba(n)
LET p4=cut(m4)
LET PA(p4)=PA(p4)+1
NEXT n
FOR n=1 TO 100
IF PA(n)<>0 THEN
PRINT n;TAB(5);PA(n);TAB(11);PA(n)-239
LET z=z+PA(n)
END IF
NEXT n
PRINT z+25
LET TM=TIME-t0
PRINT USING"####." & REPEAT$("#",2):TM;
PRINT "秒"
END
EXTERNAL FUNCTION cut(m)
OPTION ARITHMETIC NATIVE
LET a$=""&STR$(m)
LET L= VAL(RIGHT$(a$,2))
LET cut=L
END FUNCTION
----------------------------------
確認用プログラム 素数リストを読み込んで計算
OPTION ARITHMETIC NATIVE
LET t0=TIME
LET k9=9592 !78498!,9592,1229, !99999989(5761455th prime)!9999991(664579th prime)
DIM A(k9)
DIM PA(100)
OPEN #1:NAME "E:\prime_1E8xv.txt",ACCESS INPUT
FOR i=1 TO k9
INPUT #1: A(i)
NEXT i
CLOSE #1
SUB count(k9)
FOR i=26 TO k9
LET pn=A(i)
LET m=10^2
DO
LET pn=pn-m
! PRINT i;":";A(i);":";pn
LOOP UNTIL pn<100
LET PA(pn)=PA(pn)+1
NEXT i
END SUB
CALL count(k9)
FOR n=1 TO 100
IF PA(n)<>0 THEN
PRINT n;TAB(5);PA(n);TAB(11);PA(n)-239
LET z=z+PA(n)
END IF
NEXT n
PRINT
PRINT z+25
LET TM=TIME-t0
PRINT USING"####." & REPEAT$("#",2):TM;
PRINT "秒"
END
--------------------------------
最初は、こんな風に、ゆっくり計算してました。
BASIC Accelerator Version 0.9.8.0
----------------------------------------
1億まで
----------------------------------------
!Sieve of Sundaram
DECLARE EXTERNAL FUNCTION cut
OPTION ARITHMETIC NATIVE !2進モード
LET k6=5761455
DIM Ba(k6)
DIM Pa(100)
LET t0=TIME
LET k9=1E8/2
DIM A(k9)
FOR i=1 TO SQR(k9)
FOR j=i TO INT(k9/3)
LET S=i+j+2*i*j
IF s>k9 THEN GOTO 10
LET A(S)=1
NEXT j
10 NEXT i
LET Ba(1)=2
LET C=1
FOR n=1 TO k9
IF A(n)=0 THEN
LET C=C+1
LET Ba(c)=n*2+1
END IF
NEXT n
FOR n=5 TO k6
LET m4=Ba(n)
LET p4=cut(m4)
LET PA(p4)=PA(p4)+1
NEXT n
FOR n=1 TO 100
IF PA(n)<>0 THEN
PRINT n;TAB(5);PA(n);TAB(14);PA(n)-144036
LET z=z+PA(n)
END IF
NEXT n
PRINT z+4
LET TM=TIME-t0
PRINT USING"####." & REPEAT$("#",2):TM;
PRINT "秒"
END
EXTERNAL FUNCTION cut(m)
OPTION ARITHMETIC NATIVE
LET a$=""&STR$(m)
LET L= VAL(RIGHT$(a$,2))
LET cut=L
END FUNCTION
!Sieve of Sundaram
DECLARE EXTERNAL FUNCTION cut
OPTION ARITHMETIC NATIVE !2進モード
SET BITMAP SIZE 640*3+1,641 ! x,y軸方向にデフォルトの3倍拡張
SET WINDOW -10,1001,-130,120 !x,y
DRAW grid(20,10)
SET LINE COLOR 2
LET k6=5761455
DIM Ba(k6)
DIM Pa(1000)
LET t0=TIME
LET k9=1E8/2
DIM A(k9)
FOR i=1 TO SQR(k9)
FOR j=i TO INT(k9/3)
LET S=i+j+2*i*j
IF s>k9 THEN GOTO 10
LET A(S)=1
NEXT j
10 NEXT i
LET Ba(1)=2
LET C=1
FOR n=1 TO k9
IF A(n)=0 THEN
LET C=C+1
LET Ba(c)=n*2+1
END IF
NEXT n
FOR n=26 TO k6
LET m4=Ba(n)
LET p4=cut(m4)
LET PA(p4)=PA(p4)+1
NEXT n
FOR n=1 TO 1000
IF PA(n)<>0 THEN
PRINT n;TAB(7);PA(n);TAB(16);PA(n)-14404
LET z=z+PA(n)
PLOT LINES:n,PA(n)-14404;
END IF
NEXT n
PLOT LINES
PRINT z+25
LET TM=TIME-t0
PRINT USING"####." & REPEAT$("#",2):TM;
PRINT "秒"
END
EXTERNAL FUNCTION cut(m)
OPTION ARITHMETIC NATIVE
LET a$=""&STR$(m)
LET L= VAL(RIGHT$(a$,3))
LET cut=L
END FUNCTION
!6n±1篩
!A046953 6n-1 is composite. http://oeis.org/A046953
!A046954 Numbers n such that 6n+1 is nonprime. http://oeis.org/A046954
OPTION ARITHMETIC NATIVE !2進モード
LET t0=TIME
LET k=1E4
LET k2=1229
DIM P(k)
DIM A(k2) !素数
SUB prime(v) !エラトステネスの奇数列篩
LET k9=v
LET h1=1
LET A(h1)=2
LET h1=2
FOR n1=3 TO k9 STEP 2
IF P(n1)=0 THEN
LET A(h1)=n1
LET h1=h1+1
IF h1>k9+1 THEN GOTO 20
END IF
FOR k1=n1 TO k9 STEP 2
LET m1=n1*k1
IF m1>k9 THEN GOTO 10
LET P(m1)=1
NEXT k1
10 NEXT n1
20
END SUB
CALL prime(k)
LET k6=1E7 !篩の計算範囲
DIM A6(k6),A7(k6)
MAT A6 = ZER !(6*n-1)
FOR n=1 TO k2-2
LET P6=n+2
IF MOD(A(P6)+1,6)=0 THEN
LET r6=(A(P6)+1)/6
FOR i=1 TO k6
IF A(P6)*i+r6>k6/6 THEN EXIT FOR
LET A6(A(P6)*i+r6)=1
NEXT i
END IF
IF MOD(A(P6)-1,6)=0 THEN
LET r6=(A(P6)-1)/6
FOR i=1 TO k6
IF A(P6)*i-r6>k6/6 THEN EXIT FOR
LET A6(A(P6)*i-r6)=1
NEXT i
END IF
NEXT n
FOR n=1 TO k6/6
IF A6(n)=1 THEN GOTO 100
LET A7(6*n-1)=1
100 NEXT n
MAT A6 = ZER !(6*n+1)
FOR n=1 TO k2-2
LET P6=n+2
IF MOD(A(P6)+1,6)=0 THEN
LET r6=(A(P6)+1)/6
FOR i=1 TO k6
IF A(P6)*i-r6>k6/6 THEN EXIT FOR
LET A6(A(P6)*i-r6)=1
NEXT i
END IF
IF MOD(A(P6)-1,6)=0 THEN
LET r6=(A(P6)-1)/6
FOR i=1 TO k6
IF A(P6)*i+r6>k6/6 THEN EXIT FOR
LET A6(A(P6)*i+r6)=1
NEXT i
END IF
NEXT n
FOR n=1 TO k6/6
IF A6(n)=1 THEN GOTO 200
LET A7(6*n+1)=1
200 NEXT n
OPEN #1: TextWindow1
ERASE #1
PRINT #1:2;3
FOR n=1 TO k6
IF A7(n)=1 THEN
LET c1=c1+1
PRINT #1:STR$(n)&",";
END IF
NEXT n
PRINT c1+2
LET TM=TIME-t0
PRINT USING"####." & REPEAT$("#",2):TM;
PRINT "秒"
END
!A046953 6n-1 is composite. http://oeis.org/A046953
!6, 11, 13, 16, 20, 21, 24, 26, 27, 31, 34, 35, 36, 37, 41, 46, 48, 50
OPTION ARITHMETIC NATIVE !2進モード
LET k=2012
LET k2=305
DIM P(k)
DIM A(k2) !素数
SUB prime(v) !エラトステネスの奇数列篩
LET k9=v
LET h1=1
LET A(h1)=2
LET h1=2
FOR n1=3 TO k9 STEP 2
IF P(n1)=0 THEN
LET A(h1)=n1
LET h1=h1+1
IF h1>k9+1 THEN GOTO 20
END IF
FOR k1=n1 TO k9 STEP 2
LET m1=n1*k1
IF m1>k9 THEN GOTO 10
LET P(m1)=1
NEXT k1
10 NEXT n1
20
END SUB
CALL prime(k)
LET k6=1E4
DIM A6(k6)
FOR n=1 TO k2-2
LET P6=n+2
IF MOD(A(P6)+1,6)=0 THEN
LET r6=(A(P6)+1)/6
FOR i=1 TO k6
IF A(P6)*i+r6>k6 THEN EXIT FOR
LET A6(A(P6)*i+r6)=1
NEXT i
END IF
IF MOD(A(P6)-1,6)=0 THEN
LET r6=(A(P6)-1)/6
FOR i=1 TO k6
IF A(P6)*i-r6>k6 THEN EXIT FOR
LET A6(A(P6)*i-r6)=1
NEXT i
END IF
NEXT n
FOR n=1 TO k6
LET m=6*n-1
IF ISPRIME(m)=0 THEN PRINT TAB(6);n;
IF A6(n)=1 THEN PRINT n!;
NEXT n
END
EXTERNAL FUNCTION ISPRIME(N)
OPTION ARITHMETIC NATIVE
IF N=2 OR N=3 OR N=5 OR N=7 OR N=11 OR N=13 OR N=17 THEN
LET ISPRIME=1
EXIT FUNCTION
END IF
IF N=1 OR MOD(N,2)=0 THEN
LET ISPRIME=0
EXIT FUNCTION
END IF
LET D=(N-1)/2
LET S=0
DO WHILE MOD(D, 2)=0
LET D=INT(D/2)
LET S=S+1
LOOP
FOR I=1 TO 7
LET ISP=0
READ A !' n < 341550071728321 なら a=2,3,5,7,11,13,17
DATA 2,3,5,7,11,13,17
LET ISP=0
LET R=POWMOD(A,D,N)
IF R=1 OR R=N-1 THEN
LET ISP=1
END IF
LET R=POWMOD(R,2,N)
FOR J=0 TO S-1
IF R=N-1 THEN
LET ISP=1
END IF
LET R=POWMOD(R,2,N)
NEXT J
IF ISP=0 THEN
LET ISPRIME=0
EXIT FUNCTION
END IF
NEXT I
LET ISPRIME=1
END FUNCTION
EXTERNAL FUNCTION POWMOD(B,P,M)
OPTION ARITHMETIC NATIVE
LET RESULT=1
DO WHILE P>0
IF MOD(P,2)=1 THEN
LET RESULT=MOD(RESULT*B,M)
END IF
LET B=MOD(B*B,M)
LET P=INT(P/2)
LOOP
LET POWMOD=RESULT
END FUNCTION
!A046954 Numbers n such that 6n+1 is nonprime. http://oeis.org/A046954
!4, 8, 9, 14, 15, 19, 20, 22, 24, 28, 29, 31, 34, 36, 39, 41, 42, 43, 44, 48, 49, 50
OPTION ARITHMETIC NATIVE !2進モード
LET k=2012
LET k2=305
DIM P(k)
DIM A(k2) !素数
SUB prime(v) !エラトステネスの奇数列篩
LET k9=v
LET h1=1
LET A(h1)=2
LET h1=2
FOR n1=3 TO k9 STEP 2
IF P(n1)=0 THEN
LET A(h1)=n1
LET h1=h1+1
IF h1>k9+1 THEN GOTO 20
END IF
FOR k1=n1 TO k9 STEP 2
LET m1=n1*k1
IF m1>k9 THEN GOTO 10
LET P(m1)=1
NEXT k1
10 NEXT n1
20
END SUB
CALL prime(k)
LET k6=1E4
DIM A6(k6)
FOR n=1 TO k2-2
LET P6=n+2
IF MOD(A(P6)+1,6)=0 THEN
LET r6=(A(P6)+1)/6
FOR i=1 TO k6
IF A(P6)*i-r6>k6 THEN EXIT FOR
LET A6(A(P6)*i-r6)=1
NEXT i
END IF
IF MOD(A(P6)-1,6)=0 THEN
LET r6=(A(P6)-1)/6
FOR i=1 TO k6
IF A(P6)*i+r6>k6 THEN EXIT FOR
LET A6(A(P6)*i+r6)=1
NEXT i
END IF
NEXT n
FOR n=1 TO k6
LET m=6*n+1
IF ISPRIME(m)=0 THEN PRINT TAB(6);n;
IF A6(n)=1 THEN PRINT n!;
NEXT n
END
EXTERNAL FUNCTION ISPRIME(N)
OPTION ARITHMETIC NATIVE
IF N=2 OR N=3 OR N=5 OR N=7 OR N=11 OR N=13 OR N=17 THEN
LET ISPRIME=1
EXIT FUNCTION
END IF
IF N=1 OR MOD(N,2)=0 THEN
LET ISPRIME=0
EXIT FUNCTION
END IF
LET D=(N-1)/2
LET S=0
DO WHILE MOD(D, 2)=0
LET D=INT(D/2)
LET S=S+1
LOOP
FOR I=1 TO 7
LET ISP=0
READ A !' n < 341550071728321 なら a=2,3,5,7,11,13,17
DATA 2,3,5,7,11,13,17
LET ISP=0
LET R=POWMOD(A,D,N)
IF R=1 OR R=N-1 THEN
LET ISP=1
END IF
LET R=POWMOD(R,2,N)
FOR J=0 TO S-1
IF R=N-1 THEN
LET ISP=1
END IF
LET R=POWMOD(R,2,N)
NEXT J
IF ISP=0 THEN
LET ISPRIME=0
EXIT FUNCTION
END IF
NEXT I
LET ISPRIME=1
END FUNCTION
EXTERNAL FUNCTION POWMOD(B,P,M)
OPTION ARITHMETIC NATIVE
LET RESULT=1
DO WHILE P>0
IF MOD(P,2)=1 THEN
LET RESULT=MOD(RESULT*B,M)
END IF
LET B=MOD(B*B,M)
LET P=INT(P/2)
LOOP
LET POWMOD=RESULT
END FUNCTION
十進BASIC 1億まで
--------------------------------------------------
!30n± k篩
OPTION ARITHMETIC NATIVE
LET t0=TIME
LET k=104743
LET k2=10001
DIM P(k)
DIM A(k2) !素数
SUB prime(v) !エラトステネスの奇数列篩
LET k9=v
LET h1=1
LET A(h1)=2
LET h1=2
FOR n1=3 TO k9 STEP 2
IF P(n1)=0 THEN
LET A(h1)=n1
LET h1=h1+1
IF h1>k9+1 THEN GOTO 20
END IF
FOR k1=n1 TO k9 STEP 2
LET m1=n1*k1
IF m1>k9 THEN GOTO 10
LET P(m1)=1
NEXT k1
10 NEXT n1
20
END SUB
CALL prime(k)
OPEN #1: TextWindow1
ERASE #1
FOR zx=1 TO 9
PRINT #1:STR$(A(zx))&",";
NEXT zx
DIM B(8)
DATA -1,1,7,11,13,17,19,23
MAT READ B
LET ka=3333334
LET kb=ka*30
DIM D(ka)
DIM W(kb)
FOR r=1 TO 8
LET rr=B(r)
MAT D = ZER
FOR t=4 TO IP(SQR(ka*2))
LET x=A(t)
IF x>IP(SQR(kb))THEN EXIT FOR
IF r=1 THEN
IF MOD(x+1,30)=0 THEN
LET y=(x+1)/30
GOTO 80
END IF
IF MOD(x-rr,30)=0 THEN
LET y=-(x-1)/30
GOTO 80
END IF
ELSEIF r<>1 THEN
IF MOD(x+rr,30)=0 THEN
LET y=-(x+rr)/30
GOTO 80
END IF
IF MOD(x-rr,30)=0 THEN
LET y=(x-rr)/30
GOTO 80
END IF
END IF
SELECT CASE r
CASE 1,5,8
LET ss=3
CASE 2
LET ss=2
CASE 3,4
LET ss=4
CASE 6
LET ss=1
CASE 7
LET ss=-1
END SELECT
FOR i=-x TO ss !!
IF MOD(30*i+rr,x)=0 THEN LET y=i
NEXT i
80
FOR f=1 TO ka
IF x*f+y>ka THEN GOTO 90
IF x*f+y=0 THEN GOTO 90
LET D(x*f+y)=1
NEXT f
90 NEXT t
FOR n=1 TO ka
IF D(n)=1 THEN GOTO 100
IF n>ka-1 THEN GOTO 100
!PRINT #1:STR$(n*30+rr)&",";
LET W(n*30+rr)=1
! LET cj=cj+1
100 NEXT n
NEXT r
LET ci=9
FOR v=29 TO kb STEP 2
IF W(v)=1 THEN
LET ci=ci+1
PRINT #1:STR$(v)&",";
END IF
NEXT v
CLOSE #1
PRINT ci
LET TM=TIME-t0
PRINT USING"####." & REPEAT$("#",2):TM;
PRINT "秒"
END
--------------------------------------------------
十進BASIC メモリーが足りないと出た場合は、BASIC Acc
--------------------------------------------------
!30n± k篩
OPTION ARITHMETIC NATIVE
LET t0=TIME
LET k=104743
LET k2=10001
DIM P(k)
DIM A(k2) !素数
SUB prime(v) !エラトステネスの奇数列篩
LET k9=v
LET h1=1
LET A(h1)=2
LET h1=2
FOR n1=3 TO k9 STEP 2
IF P(n1)=0 THEN
LET A(h1)=n1
LET h1=h1+1
IF h1>k9+1 THEN GOTO 20
END IF
FOR k1=n1 TO k9 STEP 2
LET m1=n1*k1
IF m1>k9 THEN GOTO 10
LET P(m1)=1
NEXT k1
10 NEXT n1
20
END SUB
CALL prime(k)
OPEN #1:NAME "prime_10_8v.txt",RECTYPE INTERNAL
ERASE #1
FOR zx=1 TO 9
WRITE #1:A(zx)
NEXT zx
DIM B(8)
DATA -1,1,7,11,13,17,19,23
MAT READ B
LET ka=3333334
LET kb=ka*30
DIM D(ka)
DIM W(kb)
FOR r=1 TO 8
LET rr=B(r)
MAT D = ZER
FOR t=4 TO IP(SQR(ka*2))
LET x=A(t)
IF x>IP(SQR(kb))THEN EXIT FOR
IF r=1 THEN
IF MOD(x+1,30)=0 THEN
LET y=(x+1)/30
GOTO 80
END IF
IF MOD(x-rr,30)=0 THEN
LET y=-(x-1)/30
GOTO 80
END IF
ELSEIF r<>1 THEN
IF MOD(x+rr,30)=0 THEN
LET y=-(x+rr)/30
GOTO 80
END IF
IF MOD(x-rr,30)=0 THEN
LET y=(x-rr)/30
GOTO 80
END IF
END IF
SELECT CASE r
CASE 1,5,8
LET ss=3
CASE 2
LET ss=2
CASE 3,4
LET ss=4
CASE 6
LET ss=1
CASE 7
LET ss=-1
END SELECT
FOR i=-x TO ss !!
IF MOD(30*i+rr,x)=0 THEN LET y=i
NEXT i
80
FOR f=1 TO ka
IF x*f+y>ka THEN GOTO 90
IF x*f+y=0 THEN GOTO 90
LET D(x*f+y)=1
NEXT f
90 NEXT t
FOR n=1 TO ka
IF D(n)=1 THEN GOTO 100
IF n>ka-1 THEN GOTO 100
!PRINT #1:STR$(n*30+rr)&",";
LET W(n*30+rr)=1
! LET cj=cj+1
100 NEXT n
NEXT r
LET ci=9
FOR v=29 TO kb STEP 2
IF W(v)=1 THEN
LET ci=ci+1
WRITE #1:v
END IF
NEXT v
CLOSE #1
PRINT ci
LET TM=TIME-t0
PRINT USING"####." & REPEAT$("#",2):TM;
PRINT "秒"
END
---------------------------------------------------
6n±1篩 1億まで 最速設定 30n± k篩より数秒速い。
---------------------------------------------------
!6n±1篩
!A046953 6n-1 is composite. http://oeis.org/A046953
!A046954 Numbers n such that 6n+1 is nonprime. http://oeis.org/A046954
OPTION ARITHMETIC NATIVE !2進モード
LET t0=TIME
LET k=1E4
LET k2=1229
DIM P(k)
DIM A(k2) !素数
SUB prime(v) !エラトステネスの奇数列篩
LET k9=v
LET h1=1
LET A(h1)=2
LET h1=2
FOR n1=3 TO k9 STEP 2
IF P(n1)=0 THEN
LET A(h1)=n1
LET h1=h1+1
IF h1>k9+1 THEN GOTO 20
END IF
FOR k1=n1 TO k9 STEP 2
LET m1=n1*k1
IF m1>k9 THEN GOTO 10
LET P(m1)=1
NEXT k1
10 NEXT n1
20
END SUB
CALL prime(k)
LET k6=1E8 !篩の計算範囲
LET k5=k6/6+1
DIM A6(k5),A7(k6)
MAT A6 = ZER !(6*n-1)
FOR n=1 TO k2-2
LET P6=A(n+2)
IF MOD(P6+1,6)=0 THEN
LET r6=(P6+1)/6
FOR i=1 TO k5
IF P6*i+r6>k5 THEN EXIT FOR
LET A6(P6*i+r6)=1
NEXT i
END IF
IF MOD(P6-1,6)=0 THEN
LET r6=(P6-1)/6
FOR i=1 TO k5
IF P6*i-r6>k5 THEN EXIT FOR
LET A6(P6*i-r6)=1
NEXT i
END IF
NEXT n
FOR n=1 TO k5
IF A6(n)=1 THEN GOTO 100
LET A7(6*n-1)=1
100 NEXT n
MAT A6 = ZER !(6*n+1)
FOR n=1 TO k2-2
LET P6=A(n+2)
IF MOD(P6+1,6)=0 THEN
LET r6=(P6+1)/6
FOR i=1 TO k5
IF P6*i-r6>k5 THEN EXIT FOR
LET A6(P6*i-r6)=1
NEXT i
END IF
IF MOD(P6-1,6)=0 THEN
LET r6=(P6-1)/6
FOR i=1 TO k5
IF P6*i+r6>k5 THEN EXIT FOR
LET A6(P6*i+r6)=1
NEXT i
END IF
NEXT n
FOR n=1 TO k5
IF A6(n)=1 THEN GOTO 200
LET A7(6*n+1)=1
200 NEXT n
OPEN #1: TextWindow1
ERASE #1
PRINT #1:STR$(2)&",";
PRINT #1:STR$(3)&",";
FOR n=1 TO k6 STEP 2
IF A7(n)=1 THEN
LET c1=c1+1
PRINT #1:STR$(n)&",";
END IF
NEXT n
CLOSE #1
PRINT c1+2
LET TM=TIME-t0
PRINT USING"####." & REPEAT$("#",2):TM;
PRINT "秒"
END
素数積篩
----------------------------------------
!10n+ k篩
OPTION ARITHMETIC NATIVE
LET t0=TIME
LET k=10039
LET k2=1233
DIM P(k)
DIM A(k2) !素数
SUB prime(v) !エラトステネスの奇数列篩
LET k9=v
LET h1=1
LET A(h1)=2
LET h1=2
FOR n1=3 TO k9 STEP 2
IF P(n1)=0 THEN
LET A(h1)=n1
LET h1=h1+1
IF h1>k9+1 THEN GOTO 20
END IF
FOR k1=n1 TO k9 STEP 2
LET m1=n1*k1
IF m1>k9 THEN GOTO 10
LET P(m1)=1
NEXT k1
10 NEXT n1
20
END SUB
CALL prime(k)
OPEN #1: TextWindow1
ERASE #1
FOR zx=1 TO 4
PRINT #1:STR$(A(zx))&",";
NEXT zx
DIM B(4)
DATA 1,3,7,9
MAT READ B
LET ka=1E8/10
LET kb=ka*10
LET kc=1229
DIM D(ka)
DIM W(kb)
FOR r=1 TO 4
LET rr=B(r)
MAT D = ZER
FOR t=2 TO kc
IF t=3 THEN GOTO 90
LET x=A(t)
IF MOD(x+rr,10)=0 THEN
LET y=-(x+rr)/10
GOTO 80
END IF
IF MOD(x-rr,10)=0 THEN
LET y=(x-rr)/10
GOTO 80
END IF
FOR i=-x TO 0 !!
IF MOD(10*i+rr,x)=0 THEN LET y=i
NEXT i
80
FOR f=1 TO ka
IF x*f+y>ka THEN GOTO 90
IF x*f+y=0 THEN GOTO 90
LET D(x*f+y)=1
NEXT f
90 NEXT t
FOR n=1 TO ka
IF D(n)=1 THEN GOTO 100
IF n*10+rr>kb THEN GOTO 100
LET W(n*10+rr)=1
! LET cj=cj+1
100 NEXT n
NEXT r
LET ci=4
FOR v=11 TO kb STEP 2
IF W(v)=1 THEN
LET ci=ci+1
PRINT #1:STR$(v)&",";
END IF
NEXT v
CLOSE #1
PRINT ci
LET TM=TIME-t0
PRINT USING"####." & REPEAT$("#",2):TM;
PRINT "秒"
END
--------------------------------------
素数積篩 無限の組み合わせが可能
--------------------------------------
!100n+k篩
OPTION ARITHMETIC NATIVE
LET t0=TIME
LET k=10039
LET k2=1233
DIM P(k)
DIM A(k2) !素数
SUB prime(v) !エラトステネスの奇数列篩
LET k9=v
LET h1=1
LET A(h1)=2
LET h1=2
FOR n1=3 TO k9 STEP 2
IF P(n1)=0 THEN
LET A(h1)=n1
LET h1=h1+1
IF h1>k9+1 THEN GOTO 20
END IF
FOR k1=n1 TO k9 STEP 2
LET m1=n1*k1
IF m1>k9 THEN GOTO 10
LET P(m1)=1
NEXT k1
10 NEXT n1
20
END SUB
CALL prime(k)
OPEN #1: TextWindow1
ERASE #1
FOR zx=1 TO 25
PRINT #1:STR$(A(zx))&",";
NEXT zx
DIM B(40)
DATA 1,3,7,9,11,13,17,19,21,23,27,29,31,33,37,39,41,43,47,49
DATA 51,53,57,59,61,63,67,69,71,73,77,79,81,83,87,89,91,93,97,99
MAT READ B
LET kd=100
LET ka=1E8/kd
LET kb=ka*kd
LET kc=1229 !1E+8=1229, 1E+7=447
DIM D(ka)
DIM W(kb)
FOR r=1 TO 40
LET rr=B(r)
MAT D = ZER
FOR t=2 TO kc
IF t=3 THEN GOTO 90
LET x=A(t)
IF MOD(x+rr,kd)=0 THEN
LET y=-(x+rr)/kd
GOTO 80
END IF
IF MOD(x-rr,kd)=0 THEN
LET y=(x-rr)/kd
GOTO 80
END IF
FOR i=-x TO 0 !!
IF MOD(kd*i+rr,x)=0 THEN LET y=i
NEXT i
80
FOR f=1 TO ka
IF x*f+y>ka THEN GOTO 90
IF x*f+y=0 THEN GOTO 90
LET D(x*f+y)=1
NEXT f
90 NEXT t
FOR n=1 TO ka
IF D(n)=1 THEN GOTO 100
IF n*kd+rr>kb THEN GOTO 100
LET W(n*kd+rr)=1
! LET cj=cj+1
100 NEXT n
NEXT r
LET ci=25
FOR v=101 TO kb STEP 2
IF W(v)=1 THEN
LET ci=ci+1
PRINT #1:STR$(v)&",";
END IF
NEXT v
CLOSE #1
PRINT ci
LET TM=TIME-t0
PRINT USING"####." & REPEAT$("#",2):TM;
PRINT "秒"
END
----------------------------------------
!素数階乗の探究
OPTION ARITHMETIC RATIONAL !有理数モード
LET t0=TIME
LET k=10039
LET k2=1233
DIM P(k)
DIM A(k2) !素数
SUB prime(v) !エラトステネスの奇数列篩
LET k9=v
LET h1=1
LET A(h1)=2
LET h1=2
FOR n1=3 TO k9 STEP 2
IF P(n1)=0 THEN
LET A(h1)=n1
LET h1=h1+1
IF h1>k9+1 THEN GOTO 20
END IF
FOR k1=n1 TO k9 STEP 2
LET m1=n1*k1
IF m1>k9 THEN GOTO 10
LET P(m1)=1
NEXT k1
10 NEXT n1
20
END SUB
CALL prime(k)
OPEN #1: TextWindow1
ERASE #1
PRINT #1:STR$(2)&",";
PRINT #1:STR$(3)&",";
LET cc=2
FOR r=1 TO 100
LET s=A(r)^2
LET t=A(r+1)^2-1
LET x=1
FOR i=1 TO r
LET x=x*A(i)
NEXT i
FOR n=s TO t
LET p1=n/x
IF DENOM(p1)=x THEN
LET cc=cc+1
PRINT #1:STR$(n)&",";
END IF
NEXT n
NEXT r
CLOSE #1
PRINT n;":";cc
LET TM=TIME-t0
PRINT USING"####." & REPEAT$("#",2):TM;
PRINT "秒"
END
--------------------------------------------
ウィルソンの定理は当たり前だと言う方にはつまらないプログラムですが
、このプログラムからスタートしてます。
!k=4 素数 2*3*5*7=210
OPTION ARITHMETIC RATIONAL !有理数モード
FOR n=7 TO 11^2-1
PRINT "N=";STR$(n)&" :";n/210
LET P=N*8/35
LET p1=+MOD(N,2)/2+MOD(N,3)/3+MOD(N,5)/5+MOD(N,7)/7
LET p2=-MOD(N,6)/6-MOD(N,10)/10-MOD(N,15)/15-MOD(N,14)/14-MOD(N,21)/21-MOD(N,35)/35
LET p3=+MOD(N,30)/30+MOD(N,105)/105+MOD(N,42)/42+MOD(N,70)/70
LET p4=-MOD(N,210)/210
LET Pn=P+p1+p2+p3+p4
PRINT "P=";STR$(pn)&"+3"
PRINT n;":";p1+p3+p
PRINT n;":";p2+p4
PRINT
NEXT n
END
-------------------------------------------
!素数階乗の素数篩 MOD
OPTION ARITHMETIC RATIONAL !有理数モード
LET t0=TIME
LET k=10039
LET k2=1233
DIM P(k)
DIM A(k2) !素数
SUB prime(v) !エラトステネスの奇数列篩
LET k9=v
LET h1=1
LET A(h1)=2
LET h1=2
FOR n1=3 TO k9 STEP 2
IF P(n1)=0 THEN
LET A(h1)=n1
LET h1=h1+1
IF h1>k9+1 THEN GOTO 20
END IF
FOR k1=n1 TO k9 STEP 2
LET m1=n1*k1
IF m1>k9 THEN GOTO 10
LET P(m1)=1
NEXT k1
10 NEXT n1
20
END SUB
CALL prime(k)
OPEN #1: TextWindow1
ERASE #1
PRINT #1:STR$(2)&",";
PRINT #1:STR$(3)&",";
LET cc=2
FOR r=1 TO 50
LET s=A(r)^2
LET t=A(r+1)^2-1
LET x=1
FOR i=1 TO r
LET x=x*A(i)
NEXT i
FOR n=s TO t
LET p1=0
FOR i=1 TO r
LET p1=p1+MOD(N,A(i))/A(i)
NEXT i
IF DENOM(p1)=x THEN
LET cc=cc+1
PRINT #1:STR$(n)&",";
END IF
NEXT n
NEXT r
CLOSE #1
PRINT n;":";cc
LET TM=TIME-t0
PRINT USING"####." & REPEAT$("#",2):TM;
PRINT "秒"
END
-----------------------------------------
やたらと計算時間がかかります。
ここで、最大公約数を使用しました。
!素数階乗の探究 GCD
DECLARE EXTERNAL FUNCTION GCD
OPTION ARITHMETIC DECIMAL_HIGH !1000桁モード
!OPTION ARITHMETIC RATIONAL !有理数モード
LET t0=TIME
LET k=10039
LET k2=1233
DIM P(k)
DIM A(k2) !素数
SUB prime(v) !エラトステネスの奇数列篩
LET k9=v
LET h1=1
LET A(h1)=2
LET h1=2
FOR n1=3 TO k9 STEP 2
IF P(n1)=0 THEN
LET A(h1)=n1
LET h1=h1+1
IF h1>k9+1 THEN GOTO 20
END IF
FOR k1=n1 TO k9 STEP 2
LET m1=n1*k1
IF m1>k9 THEN GOTO 10
LET P(m1)=1
NEXT k1
10 NEXT n1
20
END SUB
CALL prime(k)
OPEN #1: TextWindow1
ERASE #1
PRINT #1:STR$(2)&",";
PRINT #1:STR$(3)&",";
LET cc=2
FOR r=1 TO 100
LET s=A(r)^2
LET t=A(r+1)^2-1
LET x=1
FOR i=1 TO r
LET x=x*A(i)
NEXT i
FOR n=s TO t
LET p1=GCD(x,n)
IF p1=1 THEN
LET cc=cc+1
PRINT #1:STR$(n)&",";
END IF
NEXT n
NEXT r
CLOSE #1
PRINT n;":";cc
LET TM=TIME-t0
PRINT USING"####." & REPEAT$("#",2):TM;
PRINT "秒"
END
EXTERNAL FUNCTION gcd(a,b)
OPTION ARITHMETIC DECIMAL_HIGH !1000桁モード
DO
LET r=MOD(a,b)
IF r=0 THEN EXIT DO
LET a=b
LET b=r
LOOP
LET gcd=b
END FUNCTION
------------------------------------
数学的知識が乏しいので、素数階乗を使うとGCDで素数判定ができることに驚きました。
まだ30万程度の素数を確かめただけです。先の事は分かりません。
!素数階乗の探究 GCD
OPTION ARITHMETIC RATIONAL !有理数モード
LET t0=TIME
LET k=10039
LET k2=1233
DIM P(k)
DIM A(k2) !素数
SUB prime(v) !エラトステネスの奇数列篩
LET k9=v
LET h1=1
LET A(h1)=2
LET h1=2
FOR n1=3 TO k9 STEP 2
IF P(n1)=0 THEN
LET A(h1)=n1
LET h1=h1+1
IF h1>k9+1 THEN GOTO 20
END IF
FOR k1=n1 TO k9 STEP 2
LET m1=n1*k1
IF m1>k9 THEN GOTO 10
LET P(m1)=1
NEXT k1
10 NEXT n1
20
END SUB
CALL prime(k)
OPEN #1: TextWindow1
ERASE #1
PRINT #1:STR$(2)&",";
PRINT #1:STR$(3)&",";
LET cc=2
FOR r=1 TO 100
LET s=A(r)^2
LET t=A(r+1)^2-1
LET x=1
FOR i=1 TO r
LET x=x*A(i)
NEXT i
FOR n=s TO t
LET p1=GCD(x,n)
IF p1=1 THEN
LET cc=cc+1
PRINT #1:STR$(n)&",";
END IF
NEXT n
NEXT r
CLOSE #1
PRINT n;":";cc
LET TM=TIME-t0
PRINT USING"####." & REPEAT$("#",2):TM;
PRINT "秒"
END
『オイラーの無限解析』レオンハルト・オイラー著 海鳴社 参照
----------------------------------------------------------
!4n±1篩 で円周率を求める。
OPTION ARITHMETIC NATIVE !2進モード
LET t0=TIME
LET k=11839
LET k2=1421
DIM P(k)
DIM A(k2) !素数
SUB prime(v) !エラトステネスの奇数列篩
LET k9=v
LET h1=1
LET A(h1)=2
LET h1=2
FOR n1=3 TO k9 STEP 2
IF P(n1)=0 THEN
LET A(h1)=n1
LET h1=h1+1
IF h1>k9+1 THEN GOTO 20
END IF
FOR k1=n1 TO k9 STEP 2
LET m1=n1*k1
IF m1>k9 THEN GOTO 10
LET P(m1)=1
NEXT k1
10 NEXT n1
20
END SUB
CALL prime(k)
LET fnpi=1-1/2
LET Q=4
LET k6=1.4E8 !篩の計算範囲
LET k5=k6/Q+1
DIM Au(k5),A7(k6)
MAT Au = ZER !(4*n-1)
FOR n=1 TO k2-1
LET Pu=A(n+1)
IF MOD(Pu+1,Q)=0 THEN
LET ru=(Pu+1)/Q
FOR i=1 TO k5
IF Pu*i+ru>k5 THEN EXIT FOR
LET Au(Pu*i+ru)=1
NEXT i
END IF
IF MOD(Pu-1,Q)=0 THEN
LET ru=(Pu-1)/Q
FOR i=1 TO k5
IF Pu*i-ru>k5 THEN EXIT FOR
LET Au(Pu*i-ru)=1
NEXT i
END IF
NEXT n
FOR n=1 TO k5
IF Au(n)=1 THEN GOTO 100
LET fnpi=fnpi*(1+1/(Q*n-1))
100 NEXT n
MAT Au = ZER !(4*n+1)
FOR n=1 TO k2-1
LET Pu=A(n+1)
IF MOD(Pu+1,Q)=0 THEN
LET ru=(Pu+1)/Q
FOR i=1 TO k5
IF Pu*i-ru>k5 THEN EXIT FOR
LET Au(Pu*i-ru)=1
NEXT i
END IF
IF MOD(Pu-1,Q)=0 THEN
LET ru=(Pu-1)/Q
FOR i=1 TO k5
IF Pu*i+ru>k5 THEN EXIT FOR
LET Au(Pu*i+ru)=1
NEXT i
END IF
NEXT n
FOR n=1 TO k5
IF Au(n)=1 THEN GOTO 200
LET fnpi=fnpi*(1-1/(Q*n+1))
200 NEXT n
PRINT 1/fnpi
PRINT PI/2
LET TM=TIME-t0
PRINT USING"####." & REPEAT$("#",2):TM;
PRINT "秒"
END
---------------------------------------------
計算結果
!4n±1篩
OPTION ARITHMETIC NATIVE !2進モード
LET t0=TIME
LET k=10039
LET k2=1233
DIM P(k)
DIM A(k2) !素数
SUB prime(v) !エラトステネスの奇数列篩
LET k9=v
LET h1=1
LET A(h1)=2
LET h1=2
FOR n1=3 TO k9 STEP 2
IF P(n1)=0 THEN
LET A(h1)=n1
LET h1=h1+1
IF h1>k9+1 THEN GOTO 20
END IF
FOR k1=n1 TO k9 STEP 2
LET m1=n1*k1
IF m1>k9 THEN GOTO 10
LET P(m1)=1
NEXT k1
10 NEXT n1
20
END SUB
CALL prime(k)
LET Q=4
LET k6=1E8 !篩の計算範囲
LET k5=k6/Q+1
DIM Au(k5),A7(k6)
MAT Au = ZER !(4*n-1)
FOR n=1 TO k2-4
LET Pu=A(n+1)
IF MOD(Pu+1,Q)=0 THEN
LET ru=(Pu+1)/Q
FOR i=1 TO k5
IF Pu*i+ru>k5 THEN EXIT FOR
LET Au(Pu*i+ru)=1
NEXT i
END IF
IF MOD(Pu-1,Q)=0 THEN
LET ru=(Pu-1)/Q
FOR i=1 TO k5
IF Pu*i-ru>k5 THEN EXIT FOR
LET Au(Pu*i-ru)=1
NEXT i
END IF
NEXT n
FOR n=1 TO k5
IF Au(n)=1 THEN GOTO 100
LET A7(Q*n-1)=1
100 NEXT n
MAT Au = ZER !(4*n+1)
FOR n=1 TO k2-4
LET Pu=A(n+1)
IF MOD(Pu+1,Q)=0 THEN
LET ru=(Pu+1)/Q
FOR i=1 TO k5
IF Pu*i-ru>k5 THEN EXIT FOR
LET Au(Pu*i-ru)=1
NEXT i
END IF
IF MOD(Pu-1,Q)=0 THEN
LET ru=(Pu-1)/Q
FOR i=1 TO k5
IF Pu*i+ru>k5 THEN EXIT FOR
LET Au(Pu*i+ru)=1
NEXT i
END IF
NEXT n
FOR n=1 TO k5
IF Au(n)=1 THEN GOTO 200
LET A7(Q*n+1)=1
200 NEXT n
OPEN #1: TextWindow1
ERASE #1
PRINT #1:STR$(2)&",";
FOR n=3 TO k6 STEP 2
IF A7(n)=1 THEN
LET c1=c1+1
PRINT #1:STR$(n)&",";
END IF
NEXT n
CLOSE #1
PRINT c1+1
LET TM=TIME-t0
PRINT USING"####." & REPEAT$("#",2):TM;
PRINT "秒"
END