本文主要是介绍攻防世界--杂项misc-2017_Dating_in_Singapore,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
题目信息
题目描述和附件分别是一串数字和新加坡日历,数字中间有短线-连接,刚好分成了12个字段。猜想对应了12个月
01081522291516170310172431-050607132027262728-0102030209162330-02091623020310090910172423-02010814222930-0605041118252627-0203040310172431-0102030108152229151617-04050604111825181920-0108152229303124171003-261912052028211407-04051213192625
解题过程
使用python脚本将代码按照‘-’分割:
s = '01081522291516170310172431-050607132027262728-0102030209162330-02091623020310090910172423-02010814222930-0605041118252627-0203040310172431-0102030108152229151617-04050604111825181920-0108152229303124171003-261912052028211407-04051213192625';
left = 0;
right = 0;
anslist = [];
for i in range(0,len(s)):if s[i] == '-':right = i;curlist = s[left:right];print("curlist------>",curlist)anslist.append(curlist)left = right+1;
anslist.append(s[left:len(s)])
print(len(anslist))
print("anslist->",anslist)
可以得到结果为:
curlist------> 01081522291516170310172431
curlist------> 050607132027262728
curlist------> 0102030209162330
curlist------> 02091623020310090910172423
curlist------> 02010814222930
curlist------> 0605041118252627
curlist------> 0203040310172431
curlist------> 0102030108152229151617
curlist------> 04050604111825181920
curlist------> 0108152229303124171003
curlist------> 261912052028211407
curlist------>04051213192625
把这些数字两两一组分隔开,在日历上圈出来:
flag为:HITB{CTFFUN}
这篇关于攻防世界--杂项misc-2017_Dating_in_Singapore的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!