from random import randint from math import floor, sqrt
ANSInum = [i for i inrange(33,127)] flagEnc=[208,140,149,236,189,77,193,104,202,184,97,236,148,202,244,199,77,122,113]
for k inrange(65*255,127*255,255): tmpDict={} #解码表 for i inrange(len(ANSInum)): tmpInt = int(floor(float(k + ANSInum[i]) / 2 + sqrt(k * ANSInum[i])) % 255) tmpDict[tmpInt] = chr(ANSInum[i]) try: flag=''.join([tmpDict[i] for i in flagEnc]) print ('flag{' + flag + '}') print (k/255) except: pass