python

ZRan 发表于 28天前 · 关联问题 梅森素数问题

result = [] sushu = [3 ,7 ,127 ,8191 ,131071 ,524287 ,2147483647] n = int(input()) for i in range(1,n+1):

x = int(input()) j = 0 for a in range(7): sushu1 = sushu[j] if sushu1 >= x: result.append(sushu1) break else: j += 1 continue

for b in result:

print(b)