f = open('hint.txt') for line in f.readlines(): point = line.split() flag_image.putpixel([int(point[0]),int(point[1])],(255,255,255)) f.close() flag_image.save('flag_image.jpg')
# -*- coding:UTF-8 -*- import sys #import gmpy2 sys.setrecursionlimit(1000000) import libnum defgcd(a,b): if b ==0: return a else: return gcd(b,a%b) n1=19927995886914135335416406082647120895619334038709715664270614604151473749182691765161766917756826761209408429340053534661116540440455731883912107733536490306892185777306017692334819486621137392115368637822832208615896079869167332092773633150006570996052837028257313679389522817781164233607188350606757597836490056930318266077647703629309920052447748365274174530490094908252256551706625163193805930254664728936230312618043386165963458944225026036816776258340041222542638064896328642143272486093326421275373201421890802797828158807121957406664052135737278317985129996476960525575320786302386904366901933941877871977923 n2=18891582332322922179757256935338383228362622765536723954262749118724360227437890613511811834258619933112000032816774390665802252670355559592889246899049387975273869584023100438870426265843757686044290924963164327025399130980205072334359825236874676865799829315906270559180981769846264222745663893031262917781276708151305378259082579089031371101323253330053986819164120184785001094503410745573822883437760154804937523455385157947633996347870180978374764506128842545299334183115882288528664242409706229889871455032394406814666870814759869179655535890356720047754561351306758635949531548031922969386197250253432717160713 c=13464724434881083014378360688491414344998156133411847847874051353940035862995104112542330206199732554180770508723141951625606376158124527681508374976085150535523169426812879850201999337951347258663163526945777620586135979743047015305904146804741356004618021619877806139998460893541631182931447449498967591502111403371136690476476964569301404706879044022446236796126968424261474149501366709514040581812492269780027443526915046387838380291031527967274048028552563236517463115042981801314702717397461735551656092225777678039402709019728332707310411968980746101194493745338399939010674127078293589259391068943187148009190 q=gcd(n1,n2) p=n1/q fv=(q-1)*(p-1) #print(fv) #fv=19927995886914135335416406082647120895619334038709715664270614604151473749182691765161766917756826761209408429340053534661116540440455731883912107733536490306892185777306017692334819486621137392115368637822832208615896079869167332092773633150006570996052837028257313679389522817781164233607188350606757597836207467980596236451329780790225129217298668351106183416252697727143995584754590162716126998422296947538087031571243444168045363157941999264066082824046684460684499824009561315836532745508925941125102683602011927119583502181606423416442482409087273246881328707856511744869202483322442194834669300162329296093888 defexgcd(a, b): if b == 0: return1, 0, a else: x, y, q = exgcd(b, a % b) x, y = y, (x - (a // b) * y) return x, y, q
definf(a,p): x, y, q = exgcd(a,p) if q != 1: raise Exception("No solution.") else: return (x + p) % p #防止负数 e=65537 d = inf(e,fv) print(d) #d=9485235877388338459999380065338576517355837252292763941456849595829852940049207118459132356264498741003803752763074751059994649777981538678712090706622782224288491129244303460559567253088480702651125460247576604293212419174493885245006343172273753385886937123448718173167474476675246610359684352485270862366337423992351175669664177212418674654079598708277862665159934890222771842941158208886077568225355615629386252999578375534095351608234168867102207724084292461763466248228546556696290682567182443618970247528589347308669724995850142241062404386362946147416210197489601711543859228600031460482974108507617072224129 #c=1346472443488108301437836068849141434499815613341184784787405135394003586299510411254233020619973255418077050872314195162560637615812452768150837497608515053552316942681287985020199933795134725866316352694577762058613597974304701530590414680474135600461802161987780613999846089354163118293144744949896759150211140337113669047647696456930140470687904402244623679612696842426147414950136670951404058181249226978002744352691504638783838029103152796727404802855256323651746311504298180131470271739746173555165609222577767803940270901972833270731041196898074 n1=19927995886914135335416406082647120895619334038709715664270614604151473749182691765161766917756826761209408429340053534661116540440455731883912107733536490306892185777306017692334819486621137392115368637822832208615896079869167332092773633150006570996052837028257313679389522817781164233607188350606757597836490056930318266077647703629309920052447748365274174530490094908252256551706625163193805930254664728936230312618043386165963458944225026036816776258340041222542638064896328642143272486093326421275373201421890802797828158807121957406664052135737278317985129996476960525575320786302386904366901933941877871977923 x=pow(c,d,n1) #print(x) flag=libnum.n2s(x) print(str(flag))