-
Notifications
You must be signed in to change notification settings - Fork 1
/
testpwr.py
35 lines (25 loc) · 782 Bytes
/
testpwr.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env python
import sys
import fileinput
P = 115792089237316195423570985008687907853269984665640564039457584007908834671663
N = 115792089237316195423570985008687907852837564279074904382605163141518161494337
# skip = int("00000000000000000000000000000000000000000000000000000027eb78574a",16)
skip = 0
def hexify(i):
return hex(i).replace("0x", "").replace("L", "").zfill(64)
data = []
for line in fileinput.input():
line = line.replace("0x", "").replace("L", "").replace("\n", "")
try:
data.append(int(line, 16))
except:
pass
end = len(data) - 1
start = 0
MIN_PWR = 96
MAX_PWR = 128
for i in range(start, end):
for j in range(MIN_PWR, MAX_PWR):
k = data[i] ** j
if k > 10000000:
print(hexify(k % N))