CF 317A(Perfect Pair-广义Fib序列p,q=1性质2&加法增长极)

本文介绍了一个算法问题,即如何通过一系列操作使一对整数变为m-完美对。详细解释了问题背景及输入输出要求,并给出了一个C++实现示例,包括对特殊情况的处理方法。

A. Perfect Pair
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Let us call a pair of integer numbers m-perfect, if at least one number in the pair is greater than or equal to m. Thus, the pairs (3, 3) and (0, 2) are 2-perfect while the pair (-1, 1) is not.

Two integers xy are written on the blackboard. It is allowed to erase one of them and replace it with the sum of the numbers, (x + y).

What is the minimum number of such operations one has to perform in order to make the given pair of integers m-perfect?

Input

Single line of the input contains three integers xy and m ( - 1018 ≤ xym ≤ 1018).

Please, do not use the %lld specifier to read or write 64-bit integers in C++. It is preffered to use the cincout streams or the %I64dspecifier.

Output

Print the minimum number of operations or "-1" (without quotes), if it is impossible to transform the given pair to the m-perfect one.

Sample test(s)
input
1 2 5
output
2
input
-1 4 15
output
4
input
0 -1 5
output
-1
Note

In the first sample the following sequence of operations is suitable: (1, 2)  (3, 2)  (5, 2).

In the second sample: (-1, 4)  (3, 4)  (7, 4)  (11, 4)  (15, 4).

Finally, in the third sample xy cannot be made positive, hence there is no proper sequence of operations.


首先,这题尽管我用了Sx的公式(可二分),但是可以暴力(加法增长极很大)

只需要把负数弄好就行.

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<iostream>
#include<algorithm>
#include<functional>
#include<cmath>
#include<cctype>
using namespace std;
#define For(i,n) for(int i=1;i<=n;i++)
#define Rep(i,n) for(int i=0;i<n;i++)
#define Fork(i,k,n) for(int i=k;i<=n;i++)
#define ForD(i,n) for(int i=n;i;i--)
#define Forp(x) for(int p=pre[x];p;p=next[p])
#define RepD(i,n) for(int i=n;i>=0;i--)
#define MEM(a) memset(a,0,sizeof(a))
#define MEMI(a) memset(a,127,sizeof(a))
#define MEMi(a) memset(a,128,sizeof(a))
#define INF (1e18)
#define MAXN (1000000)
long long x,y,m;
long long f[MAXN]={0,1,1};
int n=0;
long long work()
{
	if (max(x,y)>=m) return 0;
	long long j=0;
	if (x==0&&y==0) return -1;
	if (x<0&&y<0) return -1;
	bool b=0;
	while (max(x,y)<m)
	{
		if (x+y<=min(x,y)) return -1;
		if (x>y) swap(x,y);
		if (x>0&&y>0)
		{
			int k=1;
			while (f[k]*x+f[k+1]*y<m) k++;
			j+=k;
			return j; 
		}	
		else if (!b&&x<0&&y>0)
		{
			long long k=-x/y;
			if (m<0) k=(m-x)/y;
			j+=k;
			x+=k*y;
			b=1;
		}
		else
		{
			j++;
			x+=y;
		}	
	}
	return j;
}
int main()
{
//	freopen(".in","r",stdin);
//	freopen(".out","w",stdout);

	for(n=3;f[n-1]<INF;n++) f[n]=f[n-1]+f[n-2];
	n--;
//	For(i,n) cout<<f[i]<<' ';
	while (cin>>x>>y>>m)
		cout<<work()<<endl;

	return 0;
}



C:\Users\86180&gt;pip install notebook -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn Defaulting to user installation because normal site-packages is not writeable Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting notebook Downloading https://pypi.tuna.tsinghua.edu.cn/packages/1e/16/d3c36a0b1f6dfcf218add8eaf803bf0473ff50681ac4d51acb7ba02bce34/notebook-7.4.2-py3-none-any.whl (14.3 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 14.3/14.3 MB 4.1 MB/s eta 0:00:00 Collecting jupyter-server&lt;3,&gt;=2.4.0 (from notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/e2/a2/89eeaf0bb954a123a909859fa507fa86f96eb61b62dc30667b60dbd5fdaf/jupyter_server-2.15.0-py3-none-any.whl (385 kB) Collecting jupyterlab-server&lt;3,&gt;=2.27.1 (from notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/54/09/2032e7d15c544a0e3cd831c51d77a8ca57f7555b2e1b2922142eddb02a84/jupyterlab_server-2.27.3-py3-none-any.whl (59 kB) Collecting jupyterlab&lt;4.5,&gt;=4.4.0 (from notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/f6/ae/fbb93f4990b7648849b19112d8b3e7427bbfc9c5cc8fdc6bf14c0e86d104/jupyterlab-4.4.2-py3-none-any.whl (12.3 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12.3/12.3 MB 4.9 MB/s eta 0:00:00 Collecting notebook-shim&lt;0.3,&gt;=0.2 (from notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/f9/33/bd5b9137445ea4b680023eb0469b2bb969d61303dedb2aac6560ff3d14a1/notebook_shim-0.2.4-py3-none-any.whl (13 kB) Collecting tornado&gt;=6.2.0 (from notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/61/cc/58b1adeb1bb46228442081e746fcdbc4540905c87e8add7c277540934edb/tornado-6.4.2-cp38-abi3-win_amd64.whl (438 kB) Collecting anyio&gt;=3.1.0 (from jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/a1/ee/48ca1a7c89ffec8b6a0c5d02b89c305671d5ffd8d3c94acf8b8c408575bb/anyio-4.9.0-py3-none-any.whl (100 kB) Collecting argon2-cffi&gt;=21.1 (from jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/a4/6a/e8a041599e78b6b3752da48000b14c8d1e8a04ded09c88c714ba047f34f5/argon2_cffi-23.1.0-py3-none-any.whl (15 kB) Collecting jinja2&gt;=3.0.3 (from jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/62/a1/3d680cbfd5f4b8f15abc1d571870c5fc3e594bb582bc3b64ea099db13e56/jinja2-3.1.6-py3-none-any.whl (134 kB) Collecting jupyter-client&gt;=7.4.4 (from jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/11/85/b0394e0b6fcccd2c1eeefc230978a6f8cb0c5df1e4cd3e7625735a0d7d1e/jupyter_client-8.6.3-py3-none-any.whl (106 kB) Collecting jupyter-core!=5.0.*,&gt;=4.12 (from jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/c9/fb/108ecd1fe961941959ad0ee4e12ee7b8b1477247f30b1fdfd83ceaf017f0/jupyter_core-5.7.2-py3-none-any.whl (28 kB) Collecting jupyter-events&gt;=0.11.0 (from jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/e2/48/577993f1f99c552f18a0428731a755e06171f9902fa118c379eb7c04ea22/jupyter_events-0.12.0-py3-none-any.whl (19 kB) Collecting jupyter-server-terminals&gt;=0.4.4 (from jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/07/2d/2b32cdbe8d2a602f697a649798554e4f072115438e92249624e532e8aca6/jupyter_server_terminals-0.5.3-py3-none-any.whl (13 kB) Collecting nbconvert&gt;=6.4.4 (from jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/cc/9a/cd673b2f773a12c992f41309ef81b99da1690426bd2f96957a7ade0d3ed7/nbconvert-7.16.6-py3-none-any.whl (258 kB) Collecting nbformat&gt;=5.3.0 (from jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/a9/82/0340caa499416c78e5d8f5f05947ae4bc3cba53c9f038ab6e9ed964e22f1/nbformat-5.10.4-py3-none-any.whl (78 kB) Collecting overrides&gt;=5.0 (from jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/2c/ab/fc8290c6a4c722e5514d80f62b2dc4c4df1a68a41d1364e625c35990fcf3/overrides-7.7.0-py3-none-any.whl (17 kB) Collecting packaging&gt;=22.0 (from jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/20/12/38679034af332785aac8774540895e234f4d07f7545804097de4b666afd8/packaging-25.0-py3-none-any.whl (66 kB) Collecting prometheus-client&gt;=0.9 (from jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/ff/c2/ab7d37426c179ceb9aeb109a85cda8948bb269b7561a0be870cc656eefe4/prometheus_client-0.21.1-py3-none-any.whl (54 kB) Collecting pywinpty&gt;=2.0.1 (from jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/fb/16/2ab7b3b7f55f3c6929e5f629e1a68362981e4e5fed592a2ed1cb4b4914a5/pywinpty-2.0.15-cp313-cp313-win_amd64.whl (1.4 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.4/1.4 MB 2.6 MB/s eta 0:00:00 Collecting pyzmq&gt;=24 (from jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/c6/6c/f289c1789d7bb6e5a3b3bef7b2a55089b8561d17132be7d960d3ff33b14e/pyzmq-26.4.0-cp313-cp313-win_amd64.whl (640 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 640.4/640.4 kB 3.9 MB/s eta 0:00:00 Collecting send2trash&gt;=1.8.2 (from jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/40/b0/4562db6223154aa4e22f939003cb92514c79f3d4dccca3444253fd17f902/Send2Trash-1.8.3-py3-none-any.whl (18 kB) Collecting terminado&gt;=0.8.3 (from jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/6a/9e/2064975477fdc887e47ad42157e214526dcad8f317a948dee17e1659a62f/terminado-0.18.1-py3-none-any.whl (14 kB) Collecting traitlets&gt;=5.6.0 (from jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/00/c0/8f5d070730d7836adc9c9b6408dec68c6ced86b304a9b26a14df072a6e8c/traitlets-5.14.3-py3-none-any.whl (85 kB) Collecting websocket-client&gt;=1.7 (from jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/5a/84/44687a29792a70e111c5c477230a72c4b957d88d16141199bf9acb7537a3/websocket_client-1.8.0-py3-none-any.whl (58 kB) Collecting async-lru&gt;=1.0.0 (from jupyterlab&lt;4.5,&gt;=4.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/03/49/d10027df9fce941cb8184e78a02857af36360d33e1721df81c5ed2179a1a/async_lru-2.0.5-py3-none-any.whl (6.1 kB) Collecting httpx&gt;=0.25.0 (from jupyterlab&lt;4.5,&gt;=4.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/2a/39/e50c7c3a983047577ee07d2a9e53faf5a69493943ec3f6a384bdc792deb2/httpx-0.28.1-py3-none-any.whl (73 kB) Collecting ipykernel&gt;=6.5.0 (from jupyterlab&lt;4.5,&gt;=4.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/94/5c/368ae6c01c7628438358e6d337c19b05425727fbb221d2a3c4303c372f42/ipykernel-6.29.5-py3-none-any.whl (117 kB) Collecting jupyter-lsp&gt;=2.0.0 (from jupyterlab&lt;4.5,&gt;=4.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/07/e0/7bd7cff65594fd9936e2f9385701e44574fc7d721331ff676ce440b14100/jupyter_lsp-2.2.5-py3-none-any.whl (69 kB) Collecting setuptools&gt;=41.1.0 (from jupyterlab&lt;4.5,&gt;=4.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/b1/93/dba5ed08c2e31ec7cdc2ce75705a484ef0be1a2fecac8a58272489349de8/setuptools-80.4.0-py3-none-any.whl (1.2 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 5.5 MB/s eta 0:00:00 Collecting babel&gt;=2.10 (from jupyterlab-server&lt;3,&gt;=2.27.1-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/b7/b8/3fe70c75fe32afc4bb507f75563d39bc5642255d1d94f1f23604725780bf/babel-2.17.0-py3-none-any.whl (10.2 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.2/10.2 MB 6.7 MB/s eta 0:00:00 Collecting json5&gt;=0.9.0 (from jupyterlab-server&lt;3,&gt;=2.27.1-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/41/9f/3500910d5a98549e3098807493851eeef2b89cdd3032227558a104dfe926/json5-0.12.0-py3-none-any.whl (36 kB) Collecting jsonschema&gt;=4.18.0 (from jupyterlab-server&lt;3,&gt;=2.27.1-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/69/4a/4f9dbeb84e8850557c02365a0eee0649abe5eb1d84af92a25731c6c0f922/jsonschema-4.23.0-py3-none-any.whl (88 kB) Collecting requests&gt;=2.31 (from jupyterlab-server&lt;3,&gt;=2.27.1-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/f9/9b/335f9764261e915ed497fcdeb11df5dfd6f7bf257d4a6a2a686d80da4d54/requests-2.32.3-py3-none-any.whl (64 kB) Collecting idna&gt;=2.8 (from anyio&gt;=3.1.0-&gt;jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/76/c6/c88e154df9c4e1a2a66ccf0005a88dfb2650c1dffb6f5ce603dfbd452ce3/idna-3.10-py3-none-any.whl (70 kB) Collecting sniffio&gt;=1.1 (from anyio&gt;=3.1.0-&gt;jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/e9/44/75a9c9421471a6c4805dbf2356f7c181a29c1879239abab1ea2cc8f38b40/sniffio-1.3.1-py3-none-any.whl (10 kB) Collecting argon2-cffi-bindings (from argon2-cffi&gt;=21.1-&gt;jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/37/2c/e34e47c7dee97ba6f01a6203e0383e15b60fb85d78ac9a15cd066f6fe28b/argon2_cffi_bindings-21.2.0-cp36-abi3-win_amd64.whl (30 kB) Collecting certifi (from httpx&gt;=0.25.0-&gt;jupyterlab&lt;4.5,&gt;=4.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/4a/7e/3db2bd1b1f9e95f7cddca6d6e75e2f2bd9f51b1246e546d88addca0106bd/certifi-2025.4.26-py3-none-any.whl (159 kB) Collecting httpcore==1.* (from httpx&gt;=0.25.0-&gt;jupyterlab&lt;4.5,&gt;=4.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/7e/f5/f66802a942d491edb555dd61e3a9961140fd64c90bce1eafd741609d334d/httpcore-1.0.9-py3-none-any.whl (78 kB) Collecting h11&gt;=0.16 (from httpcore==1.*-&gt;httpx&gt;=0.25.0-&gt;jupyterlab&lt;4.5,&gt;=4.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/04/4b/29cac41a4d98d144bf5f6d33995617b185d14b22401f75ca86f384e87ff1/h11-0.16.0-py3-none-any.whl (37 kB) Collecting comm&gt;=0.1.1 (from ipykernel&gt;=6.5.0-&gt;jupyterlab&lt;4.5,&gt;=4.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/e6/75/49e5bfe642f71f272236b5b2d2691cf915a7283cc0ceda56357b61daa538/comm-0.2.2-py3-none-any.whl (7.2 kB) Collecting debugpy&gt;=1.6.5 (from ipykernel&gt;=6.5.0-&gt;jupyterlab&lt;4.5,&gt;=4.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/e0/62/a7b4a57013eac4ccaef6977966e6bec5c63906dd25a86e35f155952e29a1/debugpy-1.8.14-cp313-cp313-win_amd64.whl (5.3 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.3/5.3 MB 7.2 MB/s eta 0:00:00 Collecting ipython&gt;=7.23.1 (from ipykernel&gt;=6.5.0-&gt;jupyterlab&lt;4.5,&gt;=4.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/78/ce/5e897ee51b7d26ab4e47e5105e7368d40ce6cfae2367acdf3165396d50be/ipython-9.2.0-py3-none-any.whl (604 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 604.3/604.3 kB 8.4 MB/s eta 0:00:00 Collecting matplotlib-inline&gt;=0.1 (from ipykernel&gt;=6.5.0-&gt;jupyterlab&lt;4.5,&gt;=4.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/8f/8e/9ad090d3553c280a8060fbf6e24dc1c0c29704ee7d1c372f0c174aa59285/matplotlib_inline-0.1.7-py3-none-any.whl (9.9 kB) Collecting nest-asyncio (from ipykernel&gt;=6.5.0-&gt;jupyterlab&lt;4.5,&gt;=4.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/a0/c4/c2971a3ba4c6103a3d10c4b0f24f461ddc027f0f09763220cf35ca1401b3/nest_asyncio-1.6.0-py3-none-any.whl (5.2 kB) Collecting psutil (from ipykernel&gt;=6.5.0-&gt;jupyterlab&lt;4.5,&gt;=4.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/50/1b/6921afe68c74868b4c9fa424dad3be35b095e16687989ebbb50ce4fceb7c/psutil-7.0.0-cp37-abi3-win_amd64.whl (244 kB) Collecting MarkupSafe&gt;=2.0 (from jinja2&gt;=3.0.3-&gt;jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/29/88/07df22d2dd4df40aba9f3e402e6dc1b8ee86297dddbad4872bd5e7b0094f/MarkupSafe-3.0.2-cp313-cp313-win_amd64.whl (15 kB) Collecting attrs&gt;=22.2.0 (from jsonschema&gt;=4.18.0-&gt;jupyterlab-server&lt;3,&gt;=2.27.1-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/77/06/bb80f5f86020c4551da315d78b3ab75e8228f89f0162f2c3a819e407941a/attrs-25.3.0-py3-none-any.whl (63 kB) Collecting jsonschema-specifications&gt;=2023.03.6 (from jsonschema&gt;=4.18.0-&gt;jupyterlab-server&lt;3,&gt;=2.27.1-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/01/0e/b27cdbaccf30b890c40ed1da9fd4a3593a5cf94dae54fb34f8a4b74fcd3f/jsonschema_specifications-2025.4.1-py3-none-any.whl (18 kB) Collecting referencing&gt;=0.28.4 (from jsonschema&gt;=4.18.0-&gt;jupyterlab-server&lt;3,&gt;=2.27.1-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/c1/b1/3baf80dc6d2b7bc27a95a67752d0208e410351e3feb4eb78de5f77454d8d/referencing-0.36.2-py3-none-any.whl (26 kB) Collecting rpds-py&gt;=0.7.1 (from jsonschema&gt;=4.18.0-&gt;jupyterlab-server&lt;3,&gt;=2.27.1-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/f9/12/09e048d1814195e01f354155fb772fb0854bd3450b5f5a82224b3a319f0e/rpds_py-0.24.0-cp313-cp313-win_amd64.whl (239 kB) Collecting python-dateutil&gt;=2.8.2 (from jupyter-client&gt;=7.4.4-&gt;jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl (229 kB) Collecting platformdirs&gt;=2.5 (from jupyter-core!=5.0.*,&gt;=4.12-&gt;jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/fe/39/979e8e21520d4e47a0bbe349e2713c0aac6f3d853d0e5b34d76206c439aa/platformdirs-4.3.8-py3-none-any.whl (18 kB) Collecting pywin32&gt;=300 (from jupyter-core!=5.0.*,&gt;=4.12-&gt;jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/45/3c/b4640f740ffebadd5d34df35fecba0e1cfef8fde9f3e594df91c28ad9b50/pywin32-310-cp313-cp313-win_amd64.whl (9.5 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 9.5/9.5 MB 5.3 MB/s eta 0:00:00 Collecting python-json-logger&gt;=2.0.4 (from jupyter-events&gt;=0.11.0-&gt;jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/08/20/0f2523b9e50a8052bc6a8b732dfc8568abbdc42010aef03a2d750bdab3b2/python_json_logger-3.3.0-py3-none-any.whl (15 kB) Collecting pyyaml&gt;=5.3 (from jupyter-events&gt;=0.11.0-&gt;jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/fa/de/02b54f42487e3d3c6efb3f89428677074ca7bf43aae402517bc7cca949f3/PyYAML-6.0.2-cp313-cp313-win_amd64.whl (156 kB) Collecting rfc3339-validator (from jupyter-events&gt;=0.11.0-&gt;jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/7b/44/4e421b96b67b2daff264473f7465db72fbdf36a07e05494f50300cc7b0c6/rfc3339_validator-0.1.4-py2.py3-none-any.whl (3.5 kB) Collecting rfc3986-validator&gt;=0.1.1 (from jupyter-events&gt;=0.11.0-&gt;jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/9e/51/17023c0f8f1869d8806b979a2bffa3f861f26a3f1a66b094288323fba52f/rfc3986_validator-0.1.1-py2.py3-none-any.whl (4.2 kB) Collecting beautifulsoup4 (from nbconvert&gt;=6.4.4-&gt;jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/50/cd/30110dc0ffcf3b131156077b90e9f60ed75711223f306da4db08eff8403b/beautifulsoup4-4.13.4-py3-none-any.whl (187 kB) Collecting bleach!=5.0.0 (from bleach[css]!=5.0.0-&gt;nbconvert&gt;=6.4.4-&gt;jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/fc/55/96142937f66150805c25c4d0f31ee4132fd33497753400734f9dfdcbdc66/bleach-6.2.0-py3-none-any.whl (163 kB) Collecting defusedxml (from nbconvert&gt;=6.4.4-&gt;jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/07/6c/aa3f2f849e01cb6a001cd8554a88d4c77c5c1a31c95bdf1cf9301e6d9ef4/defusedxml-0.7.1-py2.py3-none-any.whl (25 kB) Collecting jupyterlab-pygments (from nbconvert&gt;=6.4.4-&gt;jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/b1/dd/ead9d8ea85bf202d90cc513b533f9c363121c7792674f78e0d8a854b63b4/jupyterlab_pygments-0.3.0-py3-none-any.whl (15 kB) Collecting mistune&lt;4,&gt;=2.0.3 (from nbconvert&gt;=6.4.4-&gt;jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/01/4d/23c4e4f09da849e127e9f123241946c23c1e30f45a88366879e064211815/mistune-3.1.3-py3-none-any.whl (53 kB) Collecting nbclient&gt;=0.5.0 (from nbconvert&gt;=6.4.4-&gt;jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/34/6d/e7fa07f03a4a7b221d94b4d586edb754a9b0dc3c9e2c93353e9fa4e0d117/nbclient-0.10.2-py3-none-any.whl (25 kB) Collecting pandocfilters&gt;=1.4.1 (from nbconvert&gt;=6.4.4-&gt;jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/ef/af/4fbc8cab944db5d21b7e2a5b8e9211a03a79852b1157e2c102fcc61ac440/pandocfilters-1.5.1-py2.py3-none-any.whl (8.7 kB) Collecting pygments&gt;=2.4.1 (from nbconvert&gt;=6.4.4-&gt;jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/8a/0b/9fcc47d19c48b59121088dd6da2488a49d5f72dacf8262e2790a1d2c7d15/pygments-2.19.1-py3-none-any.whl (1.2 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 2.8 MB/s eta 0:00:00 Collecting fastjsonschema&gt;=2.15 (from nbformat&gt;=5.3.0-&gt;jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/90/2b/0817a2b257fe88725c25589d89aec060581aabf668707a8d03b2e9e0cb2a/fastjsonschema-2.21.1-py3-none-any.whl (23 kB) Collecting charset-normalizer&lt;4,&gt;=2 (from requests&gt;=2.31-&gt;jupyterlab-server&lt;3,&gt;=2.27.1-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/e9/b0/0200da600134e001d91851ddc797809e2fe0ea72de90e09bec5a2fbdaccb/charset_normalizer-3.4.2-cp313-cp313-win_amd64.whl (105 kB) Collecting urllib3&lt;3,&gt;=1.21.1 (from requests&gt;=2.31-&gt;jupyterlab-server&lt;3,&gt;=2.27.1-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/6b/11/cc635220681e93a0183390e26485430ca2c7b5f9d33b15c74c2861cb8091/urllib3-2.4.0-py3-none-any.whl (128 kB) Collecting webencodings (from bleach!=5.0.0-&gt;bleach[css]!=5.0.0-&gt;nbconvert&gt;=6.4.4-&gt;jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/f4/24/2a3e3df732393fed8b3ebf2ec078f05546de641fe1b667ee316ec1dcf3b7/webencodings-0.5.1-py2.py3-none-any.whl (11 kB) Collecting tinycss2&lt;1.5,&gt;=1.1.0 (from bleach[css]!=5.0.0-&gt;nbconvert&gt;=6.4.4-&gt;jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/e6/34/ebdc18bae6aa14fbee1a08b63c015c72b64868ff7dae68808ab500c492e2/tinycss2-1.4.0-py3-none-any.whl (26 kB) Collecting colorama (from ipython&gt;=7.23.1-&gt;ipykernel&gt;=6.5.0-&gt;jupyterlab&lt;4.5,&gt;=4.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl (25 kB) Collecting decorator (from ipython&gt;=7.23.1-&gt;ipykernel&gt;=6.5.0-&gt;jupyterlab&lt;4.5,&gt;=4.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/4e/8c/f3147f5c4b73e7550fe5f9352eaa956ae838d5c51eb58e7a25b9f3e2643b/decorator-5.2.1-py3-none-any.whl (9.2 kB) Collecting ipython-pygments-lexers (from ipython&gt;=7.23.1-&gt;ipykernel&gt;=6.5.0-&gt;jupyterlab&lt;4.5,&gt;=4.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/d9/33/1f075bf72b0b747cb3288d011319aaf64083cf2efef8354174e3ed4540e2/ipython_pygments_lexers-1.1.1-py3-none-any.whl (8.1 kB) Collecting jedi&gt;=0.16 (from ipython&gt;=7.23.1-&gt;ipykernel&gt;=6.5.0-&gt;jupyterlab&lt;4.5,&gt;=4.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/c0/5a/9cac0c82afec3d09ccd97c8b6502d48f165f9124db81b4bcb90b4af974ee/jedi-0.19.2-py2.py3-none-any.whl (1.6 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.6/1.6 MB 7.9 MB/s eta 0:00:00 Collecting prompt_toolkit&lt;3.1.0,&gt;=3.0.41 (from ipython&gt;=7.23.1-&gt;ipykernel&gt;=6.5.0-&gt;jupyterlab&lt;4.5,&gt;=4.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/ce/4f/5249960887b1fbe561d9ff265496d170b55a735b76724f10ef19f9e40716/prompt_toolkit-3.0.51-py3-none-any.whl (387 kB) Collecting stack_data (from ipython&gt;=7.23.1-&gt;ipykernel&gt;=6.5.0-&gt;jupyterlab&lt;4.5,&gt;=4.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/f1/7b/ce1eafaf1a76852e2ec9b22edecf1daa58175c090266e9f6c64afcd81d91/stack_data-0.6.3-py3-none-any.whl (24 kB) Collecting fqdn (from jsonschema[format-nongpl]&gt;=4.18.0-&gt;jupyter-events&gt;=0.11.0-&gt;jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/cf/58/8acf1b3e91c58313ce5cb67df61001fc9dcd21be4fadb76c1a2d540e09ed/fqdn-1.5.1-py3-none-any.whl (9.1 kB) Collecting isoduration (from jsonschema[format-nongpl]&gt;=4.18.0-&gt;jupyter-events&gt;=0.11.0-&gt;jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/7b/55/e5326141505c5d5e34c5e0935d2908a74e4561eca44108fbfb9c13d2911a/isoduration-20.11.0-py3-none-any.whl (11 kB) Collecting jsonpointer&gt;1.13 (from jsonschema[format-nongpl]&gt;=4.18.0-&gt;jupyter-events&gt;=0.11.0-&gt;jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/71/92/5e77f98553e9e75130c78900d000368476aed74276eb8ae8796f65f00918/jsonpointer-3.0.0-py2.py3-none-any.whl (7.6 kB) Collecting uri-template (from jsonschema[format-nongpl]&gt;=4.18.0-&gt;jupyter-events&gt;=0.11.0-&gt;jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/e7/00/3fca040d7cf8a32776d3d81a00c8ee7457e00f80c649f1e4a863c8321ae9/uri_template-1.3.0-py3-none-any.whl (11 kB) Collecting webcolors&gt;=24.6.0 (from jsonschema[format-nongpl]&gt;=4.18.0-&gt;jupyter-events&gt;=0.11.0-&gt;jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/60/e8/c0e05e4684d13459f93d312077a9a2efbe04d59c393bc2b8802248c908d4/webcolors-24.11.1-py3-none-any.whl (14 kB) Collecting six&gt;=1.5 (from python-dateutil&gt;=2.8.2-&gt;jupyter-client&gt;=7.4.4-&gt;jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl (11 kB) Collecting cffi&gt;=1.0.1 (from argon2-cffi-bindings-&gt;argon2-cffi&gt;=21.1-&gt;jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/7c/fc/6a8cb64e5f0324877d503c854da15d76c1e50eb722e320b15345c4d0c6de/cffi-1.17.1-cp313-cp313-win_amd64.whl (182 kB) Collecting soupsieve&gt;1.2 (from beautifulsoup4-&gt;nbconvert&gt;=6.4.4-&gt;jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/e7/9c/0e6afc12c269578be5c0c1c9f4b49a8d32770a080260c333ac04cc1c832d/soupsieve-2.7-py3-none-any.whl (36 kB) Requirement already satisfied: typing-extensions&gt;=4.0.0 in c:\users\86180\appdata\roaming\python\python313\site-packages (from beautifulsoup4-&gt;nbconvert&gt;=6.4.4-&gt;jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) (4.13.2) Collecting pycparser (from cffi&gt;=1.0.1-&gt;argon2-cffi-bindings-&gt;argon2-cffi&gt;=21.1-&gt;jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/13/a3/a812df4e2dd5696d1f351d58b8fe16a405b234ad2886a0dab9183fb78109/pycparser-2.22-py3-none-any.whl (117 kB) Collecting parso&lt;0.9.0,&gt;=0.8.4 (from jedi&gt;=0.16-&gt;ipython&gt;=7.23.1-&gt;ipykernel&gt;=6.5.0-&gt;jupyterlab&lt;4.5,&gt;=4.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/c6/ac/dac4a63f978e4dcb3c6d3a78c4d8e0192a113d288502a1216950c41b1027/parso-0.8.4-py2.py3-none-any.whl (103 kB) Collecting wcwidth (from prompt_toolkit&lt;3.1.0,&gt;=3.0.41-&gt;ipython&gt;=7.23.1-&gt;ipykernel&gt;=6.5.0-&gt;jupyterlab&lt;4.5,&gt;=4.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/fd/84/fd2ba7aafacbad3c4201d395674fc6348826569da3c0937e75505ead3528/wcwidth-0.2.13-py2.py3-none-any.whl (34 kB) Collecting arrow&gt;=0.15.0 (from isoduration-&gt;jsonschema[format-nongpl]&gt;=4.18.0-&gt;jupyter-events&gt;=0.11.0-&gt;jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/f8/ed/e97229a566617f2ae958a6b13e7cc0f585470eac730a73e9e82c32a3cdd2/arrow-1.3.0-py3-none-any.whl (66 kB) Collecting executing&gt;=1.2.0 (from stack_data-&gt;ipython&gt;=7.23.1-&gt;ipykernel&gt;=6.5.0-&gt;jupyterlab&lt;4.5,&gt;=4.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/7b/8f/c4d9bafc34ad7ad5d8dc16dd1347ee0e507a52c3adb6bfa8887e1c6a26ba/executing-2.2.0-py2.py3-none-any.whl (26 kB) Collecting asttokens&gt;=2.1.0 (from stack_data-&gt;ipython&gt;=7.23.1-&gt;ipykernel&gt;=6.5.0-&gt;jupyterlab&lt;4.5,&gt;=4.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/25/8a/c46dcc25341b5bce5472c718902eb3d38600a903b14fa6aeecef3f21a46f/asttokens-3.0.0-py3-none-any.whl (26 kB) Collecting pure-eval (from stack_data-&gt;ipython&gt;=7.23.1-&gt;ipykernel&gt;=6.5.0-&gt;jupyterlab&lt;4.5,&gt;=4.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/8e/37/efad0257dc6e593a18957422533ff0f87ede7c9c6ea010a2177d738fb82f/pure_eval-0.2.3-py3-none-any.whl (11 kB) Collecting types-python-dateutil&gt;=2.8.10 (from arrow&gt;=0.15.0-&gt;isoduration-&gt;jsonschema[format-nongpl]&gt;=4.18.0-&gt;jupyter-events&gt;=0.11.0-&gt;jupyter-server&lt;3,&gt;=2.4.0-&gt;notebook) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/0f/b3/ca41df24db5eb99b00d97f89d7674a90cb6b3134c52fb8121b6d8d30f15c/types_python_dateutil-2.9.0.20241206-py3-none-any.whl (14 kB) Installing collected packages: webencodings, wcwidth, pywin32, pure-eval, fastjsonschema, websocket-client, webcolors, urllib3, uri-template, types-python-dateutil, traitlets, tornado, tinycss2, soupsieve, sniffio, six, setuptools, send2trash, rpds-py, rfc3986-validator, pyzmq, pyyaml, pywinpty, python-json-logger, pygments, pycparser, psutil, prompt_toolkit, prometheus-client, platformdirs, parso, pandocfilters, packaging, overrides, nest-asyncio, mistune, MarkupSafe, jupyterlab-pygments, jsonpointer, json5, idna, h11, fqdn, executing, defusedxml, decorator, debugpy, colorama, charset-normalizer, certifi, bleach, babel, attrs, async-lru, asttokens, terminado, stack_data, rfc3339-validator, requests, referencing, python-dateutil, matplotlib-inline, jupyter-core, jinja2, jedi, ipython-pygments-lexers, httpcore, comm, cffi, beautifulsoup4, anyio, jupyter-server-terminals, jupyter-client, jsonschema-specifications, ipython, httpx, arrow, argon2-cffi-bindings, jsonschema, isoduration, ipykernel, argon2-cffi, nbformat, nbclient, jupyter-events, nbconvert, jupyter-server, notebook-shim, jupyterlab-server, jupyter-lsp, jupyterlab, notebook WARNING: The scripts pywin32_postinstall.exe and pywin32_testall.exe are installed in &#39;C:\Users\86180\AppData\Roaming\Python\Python313\Scripts&#39; which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script wsdump.exe is installed in &#39;C:\Users\86180\AppData\Roaming\Python\Python313\Scripts&#39; which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script send2trash.exe is installed in &#39;C:\Users\86180\AppData\Roaming\Python\Python313\Scripts&#39; which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script pygmentize.exe is installed in &#39;C:\Users\86180\AppData\Roaming\Python\Python313\Scripts&#39; which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script pyjson5.exe is installed in &#39;C:\Users\86180\AppData\Roaming\Python\Python313\Scripts&#39; which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The scripts debugpy-adapter.exe and debugpy.exe are installed in &#39;C:\Users\86180\AppData\Roaming\Python\Python313\Scripts&#39; which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script normalizer.exe is installed in &#39;C:\Users\86180\AppData\Roaming\Python\Python313\Scripts&#39; which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script pybabel.exe is installed in &#39;C:\Users\86180\AppData\Roaming\Python\Python313\Scripts&#39; which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The scripts jupyter-migrate.exe, jupyter-troubleshoot.exe and jupyter.exe are installed in &#39;C:\Users\86180\AppData\Roaming\Python\Python313\Scripts&#39; which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The scripts jupyter-kernel.exe, jupyter-kernelspec.exe and jupyter-run.exe are installed in &#39;C:\Users\86180\AppData\Roaming\Python\Python313\Scripts&#39; which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The scripts ipython.exe and ipython3.exe are installed in &#39;C:\Users\86180\AppData\Roaming\Python\Python313\Scripts&#39; which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script httpx.exe is installed in &#39;C:\Users\86180\AppData\Roaming\Python\Python313\Scripts&#39; which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script jsonschema.exe is installed in &#39;C:\Users\86180\AppData\Roaming\Python\Python313\Scripts&#39; which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script jupyter-trust.exe is installed in &#39;C:\Users\86180\AppData\Roaming\Python\Python313\Scripts&#39; which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script jupyter-execute.exe is installed in &#39;C:\Users\86180\AppData\Roaming\Python\Python313\Scripts&#39; which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script jupyter-events.exe is installed in &#39;C:\Users\86180\AppData\Roaming\Python\Python313\Scripts&#39; which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The scripts jupyter-dejavu.exe and jupyter-nbconvert.exe are installed in &#39;C:\Users\86180\AppData\Roaming\Python\Python313\Scripts&#39; which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script jupyter-server.exe is installed in &#39;C:\Users\86180\AppData\Roaming\Python\Python313\Scripts&#39; which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The scripts jlpm.exe, jupyter-lab.exe, jupyter-labextension.exe and jupyter-labhub.exe are installed in &#39;C:\Users\86180\AppData\Roaming\Python\Python313\Scripts&#39; which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script jupyter-notebook.exe is installed in &#39;C:\Users\86180\AppData\Roaming\Python\Python313\Scripts&#39; which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. Successfully installed MarkupSafe-3.0.2 anyio-4.9.0 argon2-cffi-23.1.0 argon2-cffi-bindings-21.2.0 arrow-1.3.0 asttokens-3.0.0 async-lru-2.0.5 attrs-25.3.0 babel-2.17.0 beautifulsoup4-4.13.4 bleach-6.2.0 certifi-2025.4.26 cffi-1.17.1 charset-normalizer-3.4.2 colorama-0.4.6 comm-0.2.2 debugpy-1.8.14 decorator-5.2.1 defusedxml-0.7.1 executing-2.2.0 fastjsonschema-2.21.1 fqdn-1.5.1 h11-0.16.0 httpcore-1.0.9 httpx-0.28.1 idna-3.10 ipykernel-6.29.5 ipython-9.2.0 ipython-pygments-lexers-1.1.1 isoduration-20.11.0 jedi-0.19.2 jinja2-3.1.6 json5-0.12.0 jsonpointer-3.0.0 jsonschema-4.23.0 jsonschema-specifications-2025.4.1 jupyter-client-8.6.3 jupyter-core-5.7.2 jupyter-events-0.12.0 jupyter-lsp-2.2.5 jupyter-server-2.15.0 jupyter-server-terminals-0.5.3 jupyterlab-4.4.2 jupyterlab-pygments-0.3.0 jupyterlab-server-2.27.3 matplotlib-inline-0.1.7 mistune-3.1.3 nbclient-0.10.2 nbconvert-7.16.6 nbformat-5.10.4 nest-asyncio-1.6.0 notebook-7.4.2 notebook-shim-0.2.4 overrides-7.7.0 packaging-25.0 pandocfilters-1.5.1 parso-0.8.4 platformdirs-4.3.8 prometheus-client-0.21.1 prompt_toolkit-3.0.51 psutil-7.0.0 pure-eval-0.2.3 pycparser-2.22 pygments-2.19.1 python-dateutil-2.9.0.post0 python-json-logger-3.3.0 pywin32-310 pywinpty-2.0.15 pyyaml-6.0.2 pyzmq-26.4.0 referencing-0.36.2 requests-2.32.3 rfc3339-validator-0.1.4 rfc3986-validator-0.1.1 rpds-py-0.24.0 send2trash-1.8.3 setuptools-80.4.0 six-1.17.0 sniffio-1.3.1 soupsieve-2.7 stack_data-0.6.3 terminado-0.18.1 tinycss2-1.4.0 tornado-6.4.2 traitlets-5.14.3 types-python-dateutil-2.9.0.20241206 uri-template-1.3.0 urllib3-2.4.0 wcwidth-0.2.13 webcolors-24.11.1 webencodings-0.5.1 websocket-client-1.8.0 [notice] A new release of pip is available: 25.0.1 -&gt; 25.1.1 [notice] To update, run: python.exe -m pip install --upgrade pip
05-13
__author__ = &#39;admin&#39; # --*--coding:utf-8--*-- import execjs def exec_JsFile(text=&#39;admin&#39;, param=None): js_file = \ &#39;&#39;&#39; /** * Created by admin on 2016/3/16. */ encrypt = function (val, param){ //n, e, // Copyright (c) 2005 Tom Wu // All Rights Reserved. // See &quot;LICENSE&quot; for details. // Basic JavaScript BN library - subset useful for RSA encryption. // Bits per digit var dbits; // JavaScript engine analysis var canary = 0xdeadbeefcafe; var j_lm = ((canary&amp;0xffffff)==0xefcafe); // (public) Constructor function BigInteger(a,b,c) { if(a != null){ if(&quot;number&quot; == typeof a){ this.fromNumber(a, b, c); }else if(b == null &amp;&amp; &quot;string&quot; != typeof a){ this.fromString(a, 256); }else{ this.fromString(a, b); } } } // return new, unset BigInteger function nbi() { return new BigInteger(null); } // am: Compute w_j += (x*this_i), propagate carries, // c is initial carry, returns final carry. // c &lt; 3*dvalue, x &lt; 2*dvalue, this_i &lt; dvalue // We need to select the fastest one that works in this environment. // am1: use a single mult and divide to get the high bits, // max digit bits should be 26 because // max internal value = 2*dvalue^2-2*dvalue (&lt; 2^53) function am1(i,x,w,j,c,n) { while(--n &gt;= 0) { var v = x*this[i++]+w[j]+c; c = Math.floor(v/0x4000000); w[j++] = v&amp;0x3ffffff; } return c; } // am2 avoids a big mult-and-extract completely. // Max digit bits should be &lt;= 30 because we do bitwise ops // on values up to 2*hdvalue^2-hdvalue-1 (&lt; 2^31) function am2(i,x,w,j,c,n) { var xl = x&amp;0x7fff, xh = x&gt;&gt;15; while(--n &gt;= 0) { var l = this[i]&amp;0x7fff; var h = this[i++]&gt;&gt;15; var m = xh*l+h*xl; l = xl*l+((m&amp;0x7fff)&lt;&lt;15)+w[j]+(c&amp;0x3fffffff); c = (l&gt;&gt;&gt;30)+(m&gt;&gt;&gt;15)+xh*h+(c&gt;&gt;&gt;30); w[j++] = l&amp;0x3fffffff; } return c; } // Alternately, set max digit bits to 28 since some // browsers slow down when dealing with 32-bit numbers. function am3(i,x,w,j,c,n) { var xl = x&amp;0x3fff, xh = x&gt;&gt;14; while(--n &gt;= 0) { var l = this[i]&amp;0x3fff; var h = this[i++]&gt;&gt;14; var m = xh*l+h*xl; l = xl*l+((m&amp;0x3fff)&lt;&lt;14)+w[j]+c; c = (l&gt;&gt;28)+(m&gt;&gt;14)+xh*h; w[j++] = l&amp;0xfffffff; } return c; } // Window.prototype.navigator.app // abbbb = Window.navigator.appName //if(j_lm &amp;&amp; (window.prototype.navigator.appName == &quot;Microsoft Internet Explorer&quot;)) { // BigInteger.prototype.am = am2; // dbits = 30; //}else if(j_lm &amp;&amp; (window.prototype.navigator.appName != &quot;Netscape&quot;)) { // BigInteger.prototype.am = am1; // dbits = 26; //}else { // Mozilla/Netscape seems to prefer am3 // BigInteger.prototype.am = am3; // dbits = 28; //} BigInteger.prototype.am = am3; dbits = 28; BigInteger.prototype.DB = dbits; BigInteger.prototype.DM = ((1&lt;&lt;dbits)-1); BigInteger.prototype.DV = (1&lt;&lt;dbits); var BI_FP = 52; BigInteger.prototype.FV = Math.pow(2,BI_FP); BigInteger.prototype.F1 = BI_FP-dbits; BigInteger.prototype.F2 = 2*dbits-BI_FP; // Digit conversions var BI_RM = &quot;0123456789abcdefghijklmnopqrstuvwxyz&quot;; var BI_RC = new Array(); var rr,vv; rr = &quot;0&quot;.charCodeAt(0); for(vv = 0; vv &lt;= 9; ++vv){ BI_RC[rr++] = vv; } rr = &quot;a&quot;.charCodeAt(0); for(vv = 10; vv &lt; 36; ++vv){ BI_RC[rr++] = vv; } rr = &quot;A&quot;.charCodeAt(0); for(vv = 10; vv &lt; 36; ++vv){ BI_RC[rr++] = vv; } function int2char(n) { return BI_RM.charAt(n); } function intAt(s,i) { var c = BI_RC[s.charCodeAt(i)]; return (c==null)?-1:c; } // (protected) copy this to r function bnpCopyTo(r) { for(var i = this.t-1; i &gt;= 0; --i){ r[i] = this[i]; }; r.t = this.t; r.s = this.s; } // (protected) set from integer value x, -DV &lt;= x &lt; DV function bnpFromInt(x) { this.t = 1; this.s = (x&lt;0)?-1:0; if(x &gt; 0){ this[0] = x; }else if(x &lt; -1){ this[0] = x+this.DV; }else{ this.t = 0; } } // return bigint initialized to value function nbv(i) { var r = nbi(); r.fromInt(i); return r; } // (protected) set from string and radix function bnpFromString(s,b) { var k; if(b == 16){ k = 4; }else if(b == 8){ k = 3; }else if(b == 256){ k = 8; // byte array }else if(b == 2){ k = 1; }else if(b == 32){ k = 5; }else if(b == 4){ k = 2; }else{ this.fromRadix(s,b); return; }; this.t = 0; this.s = 0; var i = s.length, mi = false, sh = 0; while(--i &gt;= 0) { var x = (k==8)?s[i]&amp;0xff:intAt(s,i); if(x &lt; 0) { if(s.charAt(i) == &quot;-&quot;) {mi = true;} continue; }; mi = false; if(sh == 0){ this[this.t++] = x; }else if(sh+k &gt; this.DB) { this[this.t-1] |= (x&amp;((1&lt;&lt;(this.DB-sh))-1))&lt;&lt;sh; this[this.t++] = (x&gt;&gt;(this.DB-sh)); } else this[this.t-1] |= x&lt;&lt;sh; sh += k; if(sh &gt;= this.DB) sh -= this.DB; }; if(k == 8 &amp;&amp; (s[0]&amp;0x80) != 0) { this.s = -1; if(sh &gt; 0){ this[this.t-1] |= ((1&lt;&lt;(this.DB-sh))-1)&lt;&lt;sh; } }; this.clamp(); if(mi){ BigInteger.ZERO.subTo(this,this) }; } // (protected) clamp off excess high words function bnpClamp() { var c = this.s&amp;this.DM; while(this.t &gt; 0 &amp;&amp; this[this.t-1] == c){ --this.t; } } // (public) return string representation in given radix function bnToString(b) { if(this.s &lt; 0){ return &quot;-&quot;+this.negate().toString(b);} var k; if(b == 16){k = 4;} else if(b == 8){ k = 3;} else if(b == 2){ k = 1;} else if(b == 32){ k = 5;} else if(b == 4){ k = 2;} else{ return this.toRadix(b);} var km = (1&lt;&lt;k)-1, d, m = false, r = &quot;&quot;, i = this.t; var p = this.DB-(i*this.DB)%k; if(i-- &gt; 0) { if(p &lt; this.DB &amp;&amp; (d = this[i]&gt;&gt;p) &gt; 0) { m = true; r = int2char(d); } while(i &gt;= 0) { if(p &lt; k) { d = (this[i]&amp;((1&lt;&lt;p)-1))&lt;&lt;(k-p); d |= this[--i]&gt;&gt;(p+=this.DB-k); }else { d = (this[i]&gt;&gt;(p-=k))&amp;km; if(p &lt;= 0) { p += this.DB; --i; } } if(d &gt; 0){ m = true;} if(m){ r += int2char(d);} } } return m?r:&quot;0&quot;; } // (public) -this function bnNegate() { var r = nbi(); BigInteger.ZERO.subTo(this,r); return r; } // (public) |this| function bnAbs() { return (this.s&lt;0)?this.negate():this; } // (public) return + if this &gt; a, - if this &lt; a, 0 if equal function bnCompareTo(a) { var r = this.s-a.s; if(r != 0){ return r;} var i = this.t; r = i-a.t; if(r != 0){ return (this.s&lt;0)?-r:r;} while(--i &gt;= 0){ if((r=this[i]-a[i]) != 0) return r;} return 0; } // returns bit length of the integer x function nbits(x) { var r = 1, t; if((t=x&gt;&gt;&gt;16) != 0) { x = t; r += 16; } if((t=x&gt;&gt;8) != 0) { x = t; r += 8; } if((t=x&gt;&gt;4) != 0) { x = t; r += 4; } if((t=x&gt;&gt;2) != 0) { x = t; r += 2; } if((t=x&gt;&gt;1) != 0) { x = t; r += 1; } return r; } // (public) return the number of bits in &quot;this&quot; function bnBitLength() { if(this.t &lt;= 0) return 0; return this.DB*(this.t-1)+nbits(this[this.t-1]^(this.s&amp;this.DM)); } // (protected) r = this &lt;&lt; n*DB function bnpDLShiftTo(n,r) { var i; for(i = this.t-1; i &gt;= 0; --i){ r[i+n] = this[i];} for(i = n-1; i &gt;= 0; --i){ r[i] = 0;} r.t = this.t+n; r.s = this.s; } // (protected) r = this &gt;&gt; n*DB function bnpDRShiftTo(n,r) { for(var i = n; i &lt; this.t; ++i){ r[i-n] = this[i];} r.t = Math.max(this.t-n,0); r.s = this.s; } // (protected) r = this &lt;&lt; n function bnpLShiftTo(n,r) { var bs = n%this.DB; var cbs = this.DB-bs; var bm = (1&lt;&lt;cbs)-1; var ds = Math.floor(n/this.DB), c = (this.s&lt;&lt;bs)&amp;this.DM, i; for(i = this.t-1; i &gt;= 0; --i) { r[i+ds+1] = (this[i]&gt;&gt;cbs)|c; c = (this[i]&amp;bm)&lt;&lt;bs; } for(i = ds-1; i &gt;= 0; --i){ r[i] = 0;} r[ds] = c; r.t = this.t+ds+1; r.s = this.s; r.clamp(); } // (protected) r = this &gt;&gt; n function bnpRShiftTo(n,r) { r.s = this.s; var ds = Math.floor(n/this.DB); if(ds &gt;= this.t) { r.t = 0; return; } var bs = n%this.DB; var cbs = this.DB-bs; var bm = (1&lt;&lt;bs)-1; r[0] = this[ds]&gt;&gt;bs; for(var i = ds+1; i &lt; this.t; ++i) { r[i-ds-1] |= (this[i]&amp;bm)&lt;&lt;cbs; r[i-ds] = this[i]&gt;&gt;bs; } if(bs &gt; 0){ r[this.t-ds-1] |= (this.s&amp;bm)&lt;&lt;cbs;} r.t = this.t-ds; r.clamp(); } // (protected) r = this - a function bnpSubTo(a,r) { var i = 0, c = 0, m = Math.min(a.t,this.t); while(i &lt; m) { c += this[i]-a[i]; r[i++] = c&amp;this.DM; c &gt;&gt;= this.DB; } if(a.t &lt; this.t) { c -= a.s; while(i &lt; this.t) { c += this[i]; r[i++] = c&amp;this.DM; c &gt;&gt;= this.DB; } c += this.s; } else { c += this.s; while(i &lt; a.t) { c -= a[i]; r[i++] = c&amp;this.DM; c &gt;&gt;= this.DB; } c -= a.s; } r.s = (c&lt;0)?-1:0; if(c &lt; -1) r[i++] = this.DV+c; else if(c &gt; 0) r[i++] = c; r.t = i; r.clamp(); } // (protected) r = this * a, r != this,a (HAC 14.12) // &quot;this&quot; should be the larger one if appropriate. function bnpMultiplyTo(a,r) { var x = this.abs(), y = a.abs(); var i = x.t; r.t = i+y.t; while(--i &gt;= 0) r[i] = 0; for(i = 0; i &lt; y.t; ++i) r[i+x.t] = x.am(0,y[i],r,i,0,x.t); r.s = 0; r.clamp(); if(this.s != a.s) BigInteger.ZERO.subTo(r,r); } // (protected) r = this^2, r != this (HAC 14.16) function bnpSquareTo(r) { var x = this.abs(); var i = r.t = 2*x.t; while(--i &gt;= 0) { r[i] = 0; } for(i = 0; i &lt; x.t-1; ++i) { var c = x.am(i,x[i],r,2*i,0,1); if((r[i+x.t]+=x.am(i+1,2*x[i],r,2*i+1,c,x.t-i-1)) &gt;= x.DV) { r[i+x.t] -= x.DV; r[i+x.t+1] = 1; } } if(r.t &gt; 0) { r[r.t-1] += x.am(i,x[i],r,2*i,0,1); } r.s = 0; r.clamp(); } // (protected) divide this by m, quotient and remainder to q, r (HAC 14.20) // r != q, this != m. q or r may be null. function bnpDivRemTo(m,q,r) { var pm = m.abs(); if(pm.t &lt;= 0) {return;} var pt = this.abs(); if(pt.t &lt; pm.t) { if(q != null) {q.fromInt(0);} if(r != null) {this.copyTo(r);} return; } if(r == null) {r = nbi();} var y = nbi(), ts = this.s, ms = m.s; var nsh = this.DB-nbits(pm[pm.t-1]); // normalize modulus if(nsh &gt; 0) { pm.lShiftTo(nsh,y); pt.lShiftTo(nsh,r); }else { pm.copyTo(y); pt.copyTo(r); } var ys = y.t; var y0 = y[ys-1]; if(y0 == 0) {return;} var yt = y0*(1&lt;&lt;this.F1)+((ys&gt;1)?y[ys-2]&gt;&gt;this.F2:0); var d1 = this.FV/yt, d2 = (1&lt;&lt;this.F1)/yt, e = 1&lt;&lt;this.F2; var i = r.t, j = i-ys, t = (q==null)?nbi():q; y.dlShiftTo(j,t); if(r.compareTo(t) &gt;= 0) { r[r.t++] = 1; r.subTo(t,r); } BigInteger.ONE.dlShiftTo(ys,t); t.subTo(y,y); // &quot;negative&quot; y so we can replace sub with am later while(y.t &lt; ys) {y[y.t++] = 0;} while(--j &gt;= 0) { // Estimate quotient digit var qd = (r[--i]==y0)?this.DM:Math.floor(r[i]*d1+(r[i-1]+e)*d2); if((r[i]+=y.am(0,qd,r,j,0,ys)) &lt; qd) { // Try it out y.dlShiftTo(j,t); r.subTo(t,r); while(r[i] &lt; --qd) { r.subTo(t,r); } } } if(q != null) { r.drShiftTo(ys,q); if(ts != ms) {BigInteger.ZERO.subTo(q,q);} } r.t = ys; r.clamp(); if(nsh &gt; 0) { r.rShiftTo(nsh,r); } // Denormalize remainder if(ts &lt; 0) { BigInteger.ZERO.subTo(r,r); } } // (public) this mod a function bnMod(a) { var r = nbi(); this.abs().divRemTo(a,null,r); if(this.s &lt; 0 &amp;&amp; r.compareTo(BigInteger.ZERO) &gt; 0) {a.subTo(r,r);} return r; } // Modular reduction using &quot;classic&quot; algorithm function Classic(m) { this.m = m; } function cConvert(x) { if(x.s &lt; 0 || x.compareTo(this.m) &gt;= 0) {return x.mod(this.m);} else {return x;} } function cRevert(x) { return x; } function cReduce(x) { x.divRemTo(this.m,null,x); } function cMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } function cSqrTo(x,r) { x.squareTo(r); this.reduce(r); } Classic.prototype.convert = cConvert; Classic.prototype.revert = cRevert; Classic.prototype.reduce = cReduce; Classic.prototype.mulTo = cMulTo; Classic.prototype.sqrTo = cSqrTo; // (protected) return &quot;-1/this % 2^DB&quot;; useful for Mont. reduction // justification: // xy == 1 (mod m) // xy = 1+km // xy(2-xy) = (1+km)(1-km) // x[y(2-xy)] = 1-k^2m^2 // x[y(2-xy)] == 1 (mod m^2) // if y is 1/x mod m, then y(2-xy) is 1/x mod m^2 // should reduce x and y(2-xy) by m^2 at each step to keep size bounded. // JS multiply &quot;overflows&quot; differently from C/C++, so care is needed here. function bnpInvDigit() { if(this.t &lt; 1) {return 0;} var x = this[0]; if((x&amp;1) == 0) {return 0;} var y = x&amp;3; // y == 1/x mod 2^2 y = (y*(2-(x&amp;0xf)*y))&amp;0xf; // y == 1/x mod 2^4 y = (y*(2-(x&amp;0xff)*y))&amp;0xff; // y == 1/x mod 2^8 y = (y*(2-(((x&amp;0xffff)*y)&amp;0xffff)))&amp;0xffff; // y == 1/x mod 2^16 // last step - calculate inverse mod DV directly; // assumes 16 &lt; DB &lt;= 32 and assumes ability to handle 48-bit ints y = (y*(2-x*y%this.DV))%this.DV; // y == 1/x mod 2^dbits // we really want the negative inverse, and -DV &lt; y &lt; DV return (y&gt;0)?this.DV-y:-y; } // Montgomery reduction function Montgomery(m) { this.m = m; this.mp = m.invDigit(); this.mpl = this.mp&amp;0x7fff; this.mph = this.mp&gt;&gt;15; this.um = (1&lt;&lt;(m.DB-15))-1; this.mt2 = 2*m.t; } // xR mod m function montConvert(x) { var r = nbi(); x.abs().dlShiftTo(this.m.t,r); r.divRemTo(this.m,null,r); if(x.s &lt; 0 &amp;&amp; r.compareTo(BigInteger.ZERO) &gt; 0) {this.m.subTo(r,r);} return r; } // x/R mod m function montRevert(x) { var r = nbi(); x.copyTo(r); this.reduce(r); return r; } // x = x/R mod m (HAC 14.32) function montReduce(x) { while(x.t &lt;= this.mt2) // pad x so am has enough room later x[x.t++] = 0; for(var i = 0; i &lt; this.m.t; ++i) { // faster way of calculating u0 = x[i]*mp mod DV var j = x[i]&amp;0x7fff; var u0 = (j*this.mpl+(((j*this.mph+(x[i]&gt;&gt;15)*this.mpl)&amp;this.um)&lt;&lt;15))&amp;x.DM; // use am to combine the multiply-shift-add into one call j = i+this.m.t; x[j] += this.m.am(0,u0,x,i,0,this.m.t); // propagate carry while(x[j] &gt;= x.DV) { x[j] -= x.DV; x[++j]++; } } x.clamp(); x.drShiftTo(this.m.t,x); if(x.compareTo(this.m) &gt;= 0) {x.subTo(this.m,x);} } // r = &quot;x^2/R mod m&quot;; x != r function montSqrTo(x,r) { x.squareTo(r); this.reduce(r); } // r = &quot;xy/R mod m&quot;; x,y != r function montMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } Montgomery.prototype.convert = montConvert; Montgomery.prototype.revert = montRevert; Montgomery.prototype.reduce = montReduce; Montgomery.prototype.mulTo = montMulTo; Montgomery.prototype.sqrTo = montSqrTo; // (protected) true iff this is even function bnpIsEven() { return ((this.t&gt;0)?(this[0]&amp;1):this.s) == 0; } // (protected) this^e, e &lt; 2^32, doing sqr and mul with &quot;r&quot; (HAC 14.79) function bnpExp(e,z) { if(e &gt; 0xffffffff || e &lt; 1){ return BigInteger.ONE; } var r = nbi(), r2 = nbi(), g = z.convert(this), i = nbits(e)-1; g.copyTo(r); while(--i &gt;= 0){ z.sqrTo(r,r2); if((e&amp;(1&lt;&lt;i)) &gt; 0){ z.mulTo(r2,g,r); }else{ var t = r; r = r2; r2 = t; } } return z.revert(r); } // (public) this^e % m, 0 &lt;= e &lt; 2^32 function bnModPowInt(e,m) { var z; if(e &lt; 256 || m.isEven()) z = new Classic(m); else z = new Montgomery(m); return this.exp(e,z); } // protected BigInteger.prototype.copyTo = bnpCopyTo; BigInteger.prototype.fromInt = bnpFromInt; BigInteger.prototype.fromString = bnpFromString; BigInteger.prototype.clamp = bnpClamp; BigInteger.prototype.dlShiftTo = bnpDLShiftTo; BigInteger.prototype.drShiftTo = bnpDRShiftTo; BigInteger.prototype.lShiftTo = bnpLShiftTo; BigInteger.prototype.rShiftTo = bnpRShiftTo; BigInteger.prototype.subTo = bnpSubTo; BigInteger.prototype.multiplyTo = bnpMultiplyTo; BigInteger.prototype.squareTo = bnpSquareTo; BigInteger.prototype.divRemTo = bnpDivRemTo; BigInteger.prototype.invDigit = bnpInvDigit; BigInteger.prototype.isEven = bnpIsEven; BigInteger.prototype.exp = bnpExp; // public BigInteger.prototype.toString = bnToString; BigInteger.prototype.negate = bnNegate; BigInteger.prototype.abs = bnAbs; BigInteger.prototype.compareTo = bnCompareTo; BigInteger.prototype.bitLength = bnBitLength; BigInteger.prototype.mod = bnMod; BigInteger.prototype.modPowInt = bnModPowInt; // &quot;constants&quot; BigInteger.ZERO = nbv(0); BigInteger.ONE = nbv(1); //end of jsbn.js // prng4.js - uses Arcfour as a PRNG function Arcfour() { this.i = 0; this.j = 0; this.S = new Array(); } // Initialize arcfour context from key, an array of ints, each from [0..255] function ARC4init(key) { var i, j, t; for(i = 0; i &lt; 256; ++i) this.S[i] = i; j = 0; for(i = 0; i &lt; 256; ++i) { j = (j + this.S[i] + key[i % key.length]) &amp; 255; t = this.S[i]; this.S[i] = this.S[j]; this.S[j] = t; } this.i = 0; this.j = 0; } function ARC4next() { var t; this.i = (this.i + 1) &amp; 255; this.j = (this.j + this.S[this.i]) &amp; 255; t = this.S[this.i]; this.S[this.i] = this.S[this.j]; this.S[this.j] = t; return this.S[(t + this.S[this.i]) &amp; 255]; } Arcfour.prototype.init = ARC4init; Arcfour.prototype.next = ARC4next; // Plug in your RNG constructor here function prng_newstate() { return new Arcfour(); } // Pool size must be a multiple of 4 and greater than 32. // An array of bytes the size of the pool will be passed to init() var rng_psize = 256; //end of prng4.js // Random number generator - requires a PRNG backend, e.g. prng4.js // For best results, put code like // &lt;body onClick=&#39;rng_seed_time();&#39; onKeyPress=&#39;rng_seed_time();&#39;&gt; // in your main HTML document. var rng_state; var rng_pool; var rng_pptr; // Mix in a 32-bit integer into the pool function rng_seed_int(x) { rng_pool[rng_pptr++] ^= x &amp; 255; rng_pool[rng_pptr++] ^= (x &gt;&gt; 8) &amp; 255; rng_pool[rng_pptr++] ^= (x &gt;&gt; 16) &amp; 255; rng_pool[rng_pptr++] ^= (x &gt;&gt; 24) &amp; 255; if(rng_pptr &gt;= rng_psize) { rng_pptr -= rng_psize; } } // Mix in the current time (w/milliseconds) into the pool function rng_seed_time() { rng_seed_int(new Date().getTime()); } // Initialize the pool with junk if needed. if(rng_pool == null) { rng_pool = new Array(); rng_pptr = 0; var t; //if(window.crypto &amp;&amp; window.crypto.getRandomValues) { // // Use webcrypto if available // var ua = new Uint8Array(32); // window.crypto.getRandomValues(ua); // for(t = 0; t &lt; 32; ++t){ // rng_pool[rng_pptr++] = ua[t]; // } //} //if(navigator.appName == &quot;Netscape&quot; &amp;&amp; navigator.appVersion &lt; &quot;5&quot; &amp;&amp; window.crypto) { // // Extract entropy (256 bits) from NS4 RNG if available // var z = window.crypto.random(32); // for(t = 0; t &lt; z.length; ++t) // rng_pool[rng_pptr++] = z.charCodeAt(t) &amp; 255; //} //while(rng_pptr &lt; rng_psize) { // extract some randomness from Math.random() // t = Math.floor(65536 * Math.random()); // rng_pool[rng_pptr++] = t &gt;&gt;&gt; 8; // rng_pool[rng_pptr++] = t &amp; 255; //} rng_pptr = 0; rng_seed_time(); //rng_seed_int(window.screenX); //rng_seed_int(window.screenY); } function rng_get_byte() { if(rng_state == null) { rng_seed_time(); rng_state = prng_newstate(); rng_state.init(rng_pool); for(rng_pptr = 0; rng_pptr &lt; rng_pool.length; ++rng_pptr){ rng_pool[rng_pptr] = 0; } rng_pptr = 0; //rng_pool = null; } // TODO: allow reseeding after first request return rng_state.next(); } function rng_get_bytes(ba) { var i; for(i = 0; i &lt; ba.length; ++i){ ba[i] = rng_get_byte(); } } function SecureRandom() {} SecureRandom.prototype.nextBytes = rng_get_bytes; //end of rng.js // Depends on jsbn.js and rng.js // Version 1.1: support utf-8 encoding in pkcs1pad2 // convert a (hex) string to a bignum object function parseBigInt(str,r) { return new BigInteger(str,r); } /*function linebrk(s,n) { var ret = &quot;&quot;; var i = 0; while(i + n &lt; s.length) { ret += s.substring(i,i+n) + &quot;&quot;; i += n; }; return ret + s.substring(i,s.length); }*/ function byte2Hex(b) { if(b &lt; 0x10){ return &quot;0&quot; + b.toString(16); }else{ return b.toString(16); } } // PKCS#1 (type 2, random) pad input string s to n bytes, and return a bigint /* if(n &lt; s.length + 11) { // TODO: fix for utf-8 alert(&quot;Message too long for RSA&quot;); return null; } var ba = new Array(); var i = s.length - 1; while(i &gt;= 0 &amp;&amp; n &gt; 0) { var c = s.charCodeAt(i--); if(c &lt; 128) { // encode using utf-8 ba[--n] = c; } else if((c &gt; 127) &amp;&amp; (c &lt; 2048)) { ba[--n] = (c &amp; 63) | 128; ba[--n] = (c &gt;&gt; 6) | 192; } else { ba[--n] = (c &amp; 63) | 128; ba[--n] = ((c &gt;&gt; 6) &amp; 63) | 128; ba[--n] = (c &gt;&gt; 12) | 224; } } ba[--n] = 0; var rng = new SecureRandom(); var x = new Array(); while(n &gt; 2) { // random non-zero pad x[0] = 0; while(x[0] == 0) rng.nextBytes(x); ba[--n] = x[0]; } ba[--n] = 2; ba[--n] = 0; return new BigInteger(ba); }*/ // &quot;empty&quot; RSA key constructor function RSAKey() { this.n = null; this.e = 0; this.d = null; this.p = null; this.q = null; this.dmp1 = null; this.dmq1 = null; this.coeff = null; } // Set the public key fields N and e from hex strings function RSASetPublic(N,E) { if(N != null &amp;&amp; E != null &amp;&amp; N.length &gt; 0 &amp;&amp; E.length &gt; 0) { this.n = parseBigInt(N,16); this.e = parseInt(E,16); }else{ alert(&quot;Invalid RSA public key&quot;); } } // Perform raw public operation on &quot;x&quot;: return x^e (mod n) function RSADoPublic(x) { return x.modPowInt(this.e, this.n); } function nopadding(s,n) { if(n &lt; s.length) { // TODO: fix for utf-8 alert(&quot;Message too long for RSA&quot;); return null; }; //console.log(s, n) var ba = new Array(); var i = 0; var j = 0; while(i &lt; s.length &amp;&amp; j &lt; n) { var c = s.charCodeAt(i++); if(c &lt; 128) { // encode using utf-8 ba[j++] = c; }else if((c &gt; 127) &amp;&amp; (c &lt; 2048)){ ba[j++] = (c &amp; 63) | 128; ba[j++] = (c &gt;&gt; 6) | 192; }else{ ba[j++] = (c &amp; 63) | 128; ba[j++] = ((c &gt;&gt; 6) &amp; 63) | 128; ba[j++] = (c &gt;&gt; 12) | 224; } }; while (j &lt; n) { ba[j++] = 0; }; //console.log(ba) return new BigInteger(ba); } // Return the PKCS#1 RSA encryption of &quot;text&quot; as an even-length hex string function RSAEncrypt(text) { var m = nopadding(text, (this.n.bitLength()+7)&gt;&gt;3 ); if(m == null){ return null }; var c = this.doPublic(m); //console.log(c); if(c == null){ return null }; var h = c.toString(16); if((h.length &amp; 1) == 0){ return h; }else{ return &quot;0&quot; + h }; } // Return the PKCS#1 RSA encryption of &quot;text&quot; as a Base64-encoded string //function RSAEncryptB64(text) { // var h = this.encrypt(text); // if(h) return hex2b64(h); else return null; //} // protected RSAKey.prototype.doPublic = RSADoPublic; // public RSAKey.prototype.setPublic = RSASetPublic; RSAKey.prototype.encrypt = RSAEncrypt; //RSAKey.prototype.encrypt_b64 = RSAEncryptB64; //calculate rsa value var rsaObj = new RSAKey(); var n = param[0]; var e = param[1]; rsaObj.setPublic(n, e); var result = rsaObj.encrypt(val); //var result = linebrk(res, 64); //console.log(result) if(result.length != 256){ //$.su.encrypt(n,e,val); var l = Math.abs(256 - result.length); for (var i = 0; i &lt; l; i++){ result = &quot;0&quot; + result; }; } return result; } &#39;&#39;&#39; if param is None: param = [] param.append(0) param.append(0) param[1] = &#39;10001&#39; # //e param[0] = &#39;D1E79FF135D14E342D76185C23024E6DEAD4D6EC2C317A526C811E83538EA4E5ED8E1B0EEE5CE26E3C1B6A5&#39; \ &#39;F1FE11FA804F28B7E8821CA90AFA5B2F300DF99FDA27C9D2131E031EA11463C47944C05005EF4C1CE932D7F&#39; \ &#39;4A87C7563581D9F27F0C305023FCE94997EC7D790696E784357ED803A610EBB71B12A8BE5936429BFD&#39; # param[0] = &#39;B6FEE0E638E2EF995EEB9AAFE1810FB04E19FC0166B06B484FD3D0CA77F911910CB3B649D290113B0B9A065F23&#39; \ # &#39;78A5A35987BCBED056C47A8387E4C6BD00A329B8845A349A176EEA78DDA8E4CD0770F19CE66570EC683D1A6BDD&#39; \ # &#39;99505C052C00ED9C59F511F29DC5B90B81D2C215B39850C38AACC031FAF594EF2DCA87BD45C9&#39; ctx = execjs.compile(js_file) result = ctx.call(&quot;encrypt&quot;, text, param) return result def Encrypt(text=&#39;111111&#39;, param=None): &quot;&quot;&quot; :param text: :param param: the public key n, e ( 65537 ,) :return: the encryption result or None &quot;&quot;&quot; if param is None: param = [] param.append(0) param.append(0) param[1] = &#39;10001&#39; # //e to do the mod 2^e(mode(param[0]) 65537 param[0] = &#39;D1E79FF135D14E342D76185C23024E6DEAD4D6EC2C317A526C811E83538EA4E5ED8E1B0EEE5CE26E3C1B6A5&#39; \ &#39;F1FE11FA804F28B7E8821CA90AFA5B2F300DF99FDA27C9D2131E031EA11463C47944C05005EF4C1CE932D7F&#39; \ &#39;4A87C7563581D9F27F0C305023FCE94997EC7D790696E784357ED803A610EBB71B12A8BE5936429BFD&#39; # param[0] = &#39;B6FEE0E638E2EF995EEB9AAFE1810FB04E19FC0166B06B484FD3D0CA77F911910CB3B649D290113B0B9A065F23&#39; \ # &#39;78A5A35987BCBED056C47A8387E4C6BD00A329B8845A349A176EEA78DDA8E4CD0770F19CE66570EC683D1A6BDD&#39; \ # &#39;99505C052C00ED9C59F511F29DC5B90B81D2C215B39850C38AACC031FAF594EF2DCA87BD45C9&#39; # param[0] as the public key form the server try: result = exec_JsFile(text=text, param=param) return result except Exception as ex: return None if __name__ == &#39;__main__&#39;: passwd = &#39;21dd905725bef0483f91a45c954f26dd0c6640329cf266f043d8a386855b22d2e056c&#39; \ &#39;0411a8f6246fcbb8e1804a5d433a92334b312a403616eb03ac17051a3f903f39c92a7&#39; \ &#39;e512fe5b8deac4e455fbe532cd919749a75ebf8e3ed0927cf5277c2d0304478a54efa&#39; \ &#39;aa1ecd05d1b760473e6bd06734075b6040998d77ee59d87bf&#39; # &#39;admin&#39; password2 = &quot;58e8d27595663e0f3d74e5dfd83ec40cc3c6545de1a1088f355436d9f533ca71760&quot; \ &quot;3062f4fc6948de8da39c242c5ed2cdc1d845a39017fd44a7d44b08fa58daff8b1d2&quot; \ &quot;c0188b68a589e7384a1b857f8d147fef3ba4f90c74b19357441dc1acd4de81ce20e&quot; \ &quot;4795c4ce52e0896a16889112cb4df3f79ae15e9fac48ea6ae4f3900&quot; # &#39;111111&#39; password3 = &quot;09bc81d052f54794f0aa30c7c8e86de352622dfded7b014db1bbf10cc9beed17a85&quot; \ &quot;4faa2fe864ec22a09dbb2b25b9fc5a3f4d9be259676cf694f103af627d46ec21cc6&quot; \ &quot;d6b6a3d0ed5652e442034c1df2c33556e9b634b02d98f17815e1eb87c1ed942030e&quot; \ &quot;f09836b61b1ac1e6b3c3d704ada5e79aa4919546a83b9eae7f0381e&quot; # &#39;tplink&#39; password4 = &quot;717b213f81fbd6198407c85ef1ac8fb6bf491f5ba089c093dac42c91e680029600f&quot; \ &quot;faed543eede6c5b5b24efb51ec971a5f260db913224b3ee725581c8c9a885b9d8a9&quot; \ &quot;d5b55da6f9a916b3b185efa64db249e23114443227fbe5b658884b904e93b32270f&quot; \ &quot;31584eed5aa6693d6e900b79ccd7f9a52fa099eef1ff488130884e6&quot; # &#39;testtesttest&#39; # **************************** example ********************************** # text = Encrypt(text=&#39;111111&#39;) # print text # # ************ return a encrypt value (str) or None ******************** # print text == password4 test = Encrypt(text=&#39;Admin12345@_2471&#39;) print(&#39;*************************************************************************&#39;) print(test)
10-24
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值