- 博客(5)
- 收藏
- 关注
原创 crypto
#include #include<memory.h> #include<stdio.h> #include<string.h> #include<stdlib.h> #include"openssl\aes.h" #pragma comment(lib,“libssl.lib”) #pragma comment(lib,“libcrypto.lib”) void testAes(char inString[], int inLen, char passwd
2022-04-11 16:04:04 203
原创 作业
编程题第一题第一问: #include<iostream> using namespace std; int gcd(int x,int y) {int tem; while(y!=0) { tem=y; y=x%y; x=tem; } return tem ; } int main() { int p,s; cin >> p; for(int a=2;a<p-1;a++) { if(gcd(a,p-1)==1) { s=a
2020-10-20 23:48:50 71 2
原创 egcd十进制
#include<iostream> using namespace std; void egcd(int a,int b) {int r0=1; int r1=0; int s0=0; int s1=1; int q,tem,temr,tems; while(b) {q=a/b; tem=a; a=b; b=tem%b; temr=r0; r0=r1; r1=temr-q*r1; tems=s0; s0=s1; s1=tems-q*s1; }
2020-09-22 22:48:14 162
原创 bgcd
#include<iostream> using namespace std; unsigned int bgcd(unsigned int a,unsigned int b) {int k=0; while(((a|b)&1)==0){ a=a>>1; b=b>>1; k++; } while((a&1)==0){ a=a>>1; } while(b!=0){ while((b&1)==0){
2020-09-22 22:27:34 514
原创 gcd十进制
#include<iostream> using namespace std; int gcd(int x,int y) {int tem; while(y!=0) { tem=y; y=x%y; x=tem; } return tem ; } int main() { int a,b,c; cin>>a>>b; c=gcd(a,b); cout<<c; return 0; }
2020-09-22 22:26:20 76
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人