SUCTF杂项之sandgame
采用中国剩余定理,题目:https://suctf.xctf.org.cn/contest_challenge/
holes = [257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373]
sands = [222, 203, 33, 135, 203, 62, 227, 82, 239, 82, 11, 220, 74, 92, 8, 308, 195, 165, 87, 4]
n=222+257
while(n%263!= 203):
n += 257
while(n%269!= 33):
n += 257 *263
while(n%271!= 135):
n += 257 *263 *269
while(n%277!= 203):
n += 257 *263 *269 *271
while(n%281!= 62):
n += 257 *263 *269 *271*277
while(n%283!= 227):
n += 257 *263 *269 *271*277*281
while(n%293!= 82):
n += 257 *263 *269 *271*277*281*283
while(n%307!= 239):
n += 257 *263 *269 *271*277*281*283*293
while(n%311!= 82):
n += 257 *263 *269 *271*277*281*283*293*307
while(n%313!= 11):
n += 257 *263 *269 *271*277*281*283*293*307*311
while(n%317!= 220):
n += 257 *263 *269 *271*277*281*283*293*307*311*313
while(n%331!= 74):
n += 257 *263 *269 *271*277*281*283*293*307*311*313*317
while(n%337!= 92):
n += 257 *263 *269 *271*277*281*283*293*307*311*313*317*331
while(n%347!= 8):
n += 257 *263 *269 *271*277*281*283*293*307*311*313*317*331*337
while(n%349!= 308):
n += 257 *263 *269 *271*277*281*283*293*307*311*313*317*331*337*347
while(n%353!= 195):
n += 257 *263 *269 *271*277*281*283*293*307*311*313*317*331*337*347*349
while(n%359!= 165):
n += 257 *263 *269 *271*277*281*283*293*307*311*313*317*331*337*347*349*353
while(n%367!= 87):
n += 257 *263 *269 *271*277*281*283*293*307*311*313*317*331*337*347*349*353*359
while(n%373!= 4):
n += 257 *263 *269 *271*277*281*283*293*307*311*313*317*331*337*347*349*353*359*367
print(n) #481883688299168926385644485997804052926336296745
a = 481883688299168926385644485997804052926336296745
b = hex(a)
print(b) #0x546869735f69735f7468655f4352545f78776729
hex解码得到结果{This_is_the_CRT_xwg)}