This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gmpy2,math | |
def egcd(a, b): | |
u, u1 = 1 , 0 | |
v, v1 = 0 , 1 | |
while b: | |
q = a // b | |
u, u1 = u1, u - q * u1 | |
v, v1 = v1, v - q * v1 | |
a, b = b, a - q * b | |
return a, u, v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# challenge titanic | |
# source asis-ctf-2020 | |
import hashlib | |
import uuid | |
from pwn import * | |
from Crypto.Util.number import * | |
import string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// the algorithm is known as Sardinas–Patterson algo. | |
#include <bits/stdc++.h> | |
using namespace std; | |
// in-short-use macros | |
#define ll long long int | |
#define ld long double | |
#define pb push_back |