Skip to content

Instantly share code, notes, and snippets.

View stevenyu113228's full-sized avatar

Steven Meow stevenyu113228

View GitHub Profile
import gmpy2
p = 1634733645809253848443133883865090859841783670033092312181110852389333100104508151212118167511579
q = 1900871281664822113126851573935413975471896789968515493666638539088027103802104498957191261465571
e = 65537
n = p*q
phi = (p-1)*(q-1)
d = int(gmpy2.invert(e,phi))
#include <iostream>
using namespace std;
struct s_matrix_obj {
uint32_t r;
uint32_t c;
uint32_t v;
};
struct s_matrix{
@stevenyu113228
stevenyu113228 / 怪怪的資結題目.cpp
Last active March 15, 2019 01:26
怪怪的資結題目.cpp
// (a) Always passed by reference
int fun(int *a){
cout<<&a;
}
int main(){
int aa[3];
cout<<&aa<<endl;
fun(aa);
}
/*
Computer Science An Over View 12th
P.573 question 50
n = 3233 ---> 3233 = 53 * 61
e = 17
暴力解 k與d
ps.
e*d=k*(p-1)-(q-1)+1
17*d=3120*k+1
@stevenyu113228
stevenyu113228 / aaa.ino
Last active June 1, 2017 01:53
阿堆妞計算機?!?!
const byte add = 13;
const byte sub = 12;
const byte mul = 11;
const byte dive = 10;
const byte equal = 9;
const byte count = 8;
const byte enter = 7;
const byte cancel = 6;
void setup()
/*
螺旋數字.c
**禁止使用goto與陣列
ps: 程式無防呆 請輸入小於100的4的倍數 (正整數)
ex:4
0102
0403
ex1:8
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
int x;
printf("input x:");
scanf_s("%d", &x);
@stevenyu113228
stevenyu113228 / 十進位轉二進位.c
Last active April 8, 2017 05:12
十進位轉二進位
/*
十進位轉二進位
By 8787 2017/03/16
*/
#include <stdio.h>
#include <stdlib.h>
int main()
{
int input; //宣告輸入的變數
# device_id, sid, uid 需要自己先抓包获取到
# game_mode 1是无尽模式 2是限时模式
import hashlib
import hmac
import base64
import requests
def data_to_string(data):