/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */
#content_views .toc,
/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */
#content_views.markdown_views > p:empty:has(+ .toc),
#content_views.markdown_views > .toc + p:empty,
/* 富文本旧版目录标记 */
#content_views.htmledit_views #main-toc,
#content_views.htmledit_views #hr-toc,
#content_views.htmledit_views p[id*=\”-toc\”] {
display: none !important;
}
/* 目录去掉后,紧跟的首个标题不再多出一块上边距 */
#content_views.markdown_views > .toc + h1,
#content_views.markdown_views > .toc + h2,
#content_views.markdown_views > .toc + h3,
#content_views.markdown_views > .toc + h4,
#content_views.markdown_views > .toc + p:empty + h1,
#content_views.markdown_views > .toc + p:empty + h2,
#content_views.markdown_views > .toc + p:empty + h3,
#content_views.markdown_views > .toc + p:empty + h4 {
margin-top: 0 !important;
}
题目:cloverdayssss对xing进行了数字轰炸
xing:“看不懂,记一下……”
第1天收到了:“25 31 32 36 37 40 43 44 45 46 47 55 56 57 58 59 61 69 98 106 120 129 138 139 140 143 144”
第2天收到了:“25 30 35 43 59 61 68 69 97 98 106 120 128 129 137 141 145”
第3天收到了:“0 1 3 7 8 9 13 14 15 19 20 21 24 25 26 29 30 31 35 39 40 43 44 45 46 58 61 62 63 64 69 74 75 76 77 86 87 88 89 91 93 94 98 103 104 105 106 115 116 117 120 121 122 123 127 129 132 134 135 141 145”
第4天收到了:“0 2 4 6 10 12 16 18 25 30 35 40 47 57 61 65 69 73 85 89 91 92 98 102 106 114 120 124 126 129 132 133 140 145”
第5天收到了:“0 2 4 6 10 12 13 14 15 16 18 25 30 34 35 40 47 57 61 65 69 74 75 76 85 89 91 98 102 106 114 120 124 126 127 128 129 130 132 139 145 146”
第6天收到了:“0 2 4 6 10 12 18 25 30 35 40 43 47 56 61 65 69 77 86 87 88 89 91 98 102 106 114 120 124 129 132 145”
第7天收到了:“0 2 4 7 8 9 13 14 15 19 20 21 26 27 30 35 39 40 41 44 45 46 56 61 65 68 69 70 73 74 75 76 89 91 97 98 99 103 104 105 106 115 116 117 120 124 129 132 139 145”
第8天收到了:“35 85 89 145”
第9天收到了:“36 37 49 50 51 52 53 79 80 81 82 83 86 87 88 108 109 110 111 112 143 144”
xing:什么叫这是像素画啊?这最多也只能是个点啊……什么坐标轴?
提示:方格上更清晰
(不得不说主播toma的被提示带偏到姥姥家了,看到方格还以为是方形画布或者二维码,然后浪费半小时,现在才意识到方格是指像素)
解题步骤:
一维像素按行拼凑:把每一天的数据当成“画布的一行”(Y轴),而数字本身作为像素的横坐标(X轴)。把每一天的对应位置涂黑,剩下留白。
解题脚本:
import numpy as np
from PIL import Image
data = [
[25, 31, 32, 36, 37, 40, 43, 44, 45, 46, 47, 55, 56, 57, 58, 59, 61, 69, 98, 106, 120, 129, 138, 139, 140, 143, 144],
[25, 30, 35, 43, 59, 61, 68, 69, 97, 98, 106, 120, 128, 129, 137, 141, 145],
[0, 1, 3, 7, 8, 9, 13, 14, 15, 19, 20, 21, 24, 25, 26, 29, 30, 31, 35, 39, 40, 43, 44, 45, 46, 58, 61, 62, 63, 64, 69, 74, 75, 76, 77, 86, 87, 88, 89, 91, 93, 94, 98, 103, 104, 105, 106, 115, 116, 117, 120, 121, 122, 123, 127, 129, 132, 134, 135, 141, 145],
[0, 2, 4, 6, 10, 12, 16, 18, 25, 30, 35, 40, 47, 57, 61, 65, 69, 73, 85, 89, 91, 92, 98, 102, 106, 114, 120, 124, 126, 129, 132, 133, 140, 145],
[0, 2, 4, 6, 10, 12, 13, 14, 15, 16, 18, 25, 30, 34, 35, 40, 47, 57, 61, 65, 69, 74, 75, 76, 85, 89, 91, 98, 102, 106, 114, 120, 124, 126, 127, 128, 129, 130, 132, 139, 145, 146],
[0, 2, 4, 6, 10, 12, 18, 25, 30, 35, 40, 43, 47, 56, 61, 65, 69, 77, 86, 87, 88, 89, 91, 98, 102, 106, 114, 120, 124, 129, 132, 145],
[0, 2, 4, 7, 8, 9, 13, 14, 15, 19, 20, 21, 26, 27, 30, 35, 39, 40, 41, 44, 45, 46, 56, 61, 65, 68, 69, 70, 73, 74, 75, 76, 89, 91, 97, 98, 99, 103, 104, 105, 106, 115, 116, 117, 120, 124, 129, 132, 139, 145],
[35, 85, 89, 145],
[36, 37, 49, 50, 51, 52, 53, 79, 80, 81, 82, 83, 86, 87, 88, 108, 109, 110, 111, 112, 143, 144]
]
# 最大数字为 146,所以宽度为 147
width = 147
height = len(data) # 9 行
# 创建黑色背景,白色像素 (0为黑, 255为白)
img_array = np.zeros((height, width), dtype=np.uint8)
for y, day_data in enumerate(data):
for num in day_data:
img_array[y, num] = 255 # 将当天的数字作为 X 坐标点亮
# 生成并保存图片
img = Image.fromarray(img_array)
img = img.resize((width * 10, height * 10), Image.NEAREST) # 放大 10 倍
img.save("pixel_row_by_row.png")
运行脚本后将得到如下图片:

成功获得flag
网硕互联帮助中心




评论前必须登录!
注册