目录

  • Chapter 1 The Hackpad

    • Increment me
    • Positive
    • Absolute
    • Absolute2
  • Chapter 2 High School Hack
    • Power
    • Power 2
    • Length
    • Push it
  • Chapter 3 Jailbreak
    • Max
    • Maxxxx
    • This is odd
    • A man, a plan, a canal: Panama
  • Chapter 4 Ch
    • Bring some order
    • Missing numbers
    • Anagrams
  • Chapter 5 Corrupted
    • 110101110101000101
    • Prime
    • Number in order
  • Chapter 6 Cyber Attack
    • Complete
    • Match
    • Rotate
  • Chapter 7 Nuclear Plant
    • Add one
    • Positivity
    • Nearest to [0,0]
  • Chapter 8 Killer Robot
    • Addition
    • Match 2
  • Chapter 9 Skynet
    • Tree
  • Chapter 10 Retirement
    • Draw

Chapter 1 The Hackpad

As a 16-year-old kid in a normal town, living a normal life, everything is boring as hell. Walking home, some guy comes up to you and says:
-Kid, you don't know me, but I know you, I'd tell you about me and where I come from but you wouldn't believe me. I don't have much time. Take this HackPad,use it to stop Sky... Use it to save the world when the time comes. Right now, just learn how to use it, and keep it with you at all times. Go hack your way up kid! I believe in you!-

Increment me

  • Pattern detected
    in |out
    :---:|:---:
    2 | 3
    5 | 6
    8 | 9

  • Code
input+1;

Positive

  • Pattern detected
    in |out
    :---:|:---:
    3 | true
    -7 | false
    9 | true

  • Code
input>0;

Absolute

  • Pattern detected
    in |out
    :---:|:---:
    1 | 1
    -2 | 2
    0 | 0

  • Code
if input < 0 {return -input;
}
return input;

Absolute2

  • Pattern detected
    in |out
    :---:|:---:
    1 | 1
    -2 | 2
    0 | 0

  • Code
abs(input);

Chapter 2 High School Hack

So here you are with this cool HackPad and a lot of time on your hands. Your grades are not so good, let's use this HackPad to give them a little boost.
A High school grading system cannot be that hard to hack with this thing, right?

Power

  • Pattern detected
    in |out
    :---:|:---:
    2 | 4
    3 | 9
    4 | 16

  • Code
while var_a < input {var_b = var_b + input;var_a++;
}
retrun var_b;

Power 2

  • Pattern detected
    in |out
    :---:|:---:
    2 | 4
    3 | 9
    4 | 16

  • Code
pow(input,2);

Length

  • Pattern detected
    in |out
    :---:|:---:
    [3,8] | 2
    [4,5,3] | 3
    [6] | 1

  • Code
foreach var_a in input {var_b++;
}
return var_b;

Push it

  • Pattern detected
    in |out
    :---:|:---:
    5 | [0,1,2,3,4]
    2 | [0,1]
    0 | []

  • Code
var_a = [];
while var_b < input {var_a.push(var_b);var_b++;
}
return var_a;

Chapter 3 Jailbreak

A good friend of yours comes up to you with his brand new phone, asking if you could Jailbreak it. He's pretty techsavvy, so you ask him why he doesn't just go on the web and do it himself. He says no-one has managed to crack the security on this model yet.
Sounds like a job for your HackPad.

Max

  • Pattern detected
    in |out
    :---:|:---:
    [3,8] | 8
    [3,1] | 3
    [0,99] | 99

  • Code
var_a = input[0];
foreach var_b in input {if var_a < var_b {var_a = var_b;}
}
return var_a;

Maxxxx

  • Pattern detected
    in |out
    :---:|:---:
    [3,1,8,0,2] | 8
    [1,3,2] | 3
    [9,42,7,13] | 42

  • Code
var_a = input[0];
foreach var_b in input {var_a = max(var_a,var_b);
}

This is odd

  • Pattern detected
    in |out
    :---:|:---:
    5 | 1
    7 | 1
    2 | 0

  • Code
while input > 1 {input=input-2;
}

A man, a plan, a canal: Panama

  • Pattern detected
    in |out
    :---:|:---:
    [c,a,t] | false
    [k,a,y,a,k] | true
    [b,o,b] | true

  • Code
var_a = input.length / 2;
var_b = input.length - 1;
while var_c < var_a {if input[var_c] != input[var_b - var_c] {return false;}var_c++;
}
return true;

Chapter 4 Ch

You've finished most of the games on the latest console, but there is one game resisting you. It's ridiculously hard.
Turn on your HackPad and don't put it down until you've hacked your way to the top.

Bring some order

  • Pattern detected
    in |out
    :---:|:---:
    [c,b,a] | [a,b,c]
    [d,g,e,h,f] | [d,e,f,g,h]
    [z,x,y,w] | [w,x,y,z]

  • Code
while var_a < input.length - 1 {var_b=0;while var_b < input.length - var_a - 1 {if input[var_b] > input[var_b + 1] {var_c = input[var_b];input[var_b] = input [var_b + 1];input [var_b + 1] = var_c;}var_b++;}var_a++;
}
return input;

Missing numbers

  • Pattern detected
    in |out
    :---:|:---:
    [0,3,2] | [1]
    [1,3] | [0,2]
    [4,2,3] | [0,1]

  • Code
    input.sort;var_a = [];while var_b < input.length {while var_c < input[var_b] {var_a.push(var_c);var_c++;}var_c++;var_b++;}return var_a;

Anagrams

  • Pattern detected
    in |out
    :---:|:---:
    [[d,a,d],[a,d,d]] | true
    [[a,t,e],[e,a,t],[t,e,a]] |true
    [[n,o,t],[o,n,e]] | false

  • Code
var_a = input[0].length;
while var_b < input.length {if var_a != input[var_b].length {return false;}input[var_b].sort;var_b++;
}
while var_c < input[0].length {var_d=0;while var_d < input.length {if input[0][var_c] != input[var_d][var_c] {return false;}var_d++;}var_c++;
}
return true;

Chapter 5 Corrupted

Wikileaks is awesome . You would love to be part of their team and expose corrupted politicians. You already joined a bunch of forums to see what they're up to. Right now they're trying to prove that an influential politician is involved in drugs and weapon trafficking in third world counties.
This is your chance to use your HackPad for justice, all you have to do is figure out a way to infiltrate his emails...

110101110101000101

  • Pattern detected
    in |out
    :---:|:---:
    [1,0,1] | 5
    [0,1,0] |2
    [1,1,0] | 6

  • Code
while var_a < input.length {var_b = var_b + input[var_a] * pow(2,input.length-var_a-1);var_a++;
}
return var_b;

Prime

  • Pattern detected
    in |out
    :---:|:---:
    3 | true
    12|false
    17| true

  • Code
if input < 2 {return false;
}
var_a = 2;
while var_a * var_a < input {if mod(input,var_a) == 0 {return false;}var_a++;
}
return true; 

Number in order

  • Pattern detected
    in |out
    :---:|:---:
    [f,o,r,t,y] | true
    [d,o,s] |true
    [q,u,a,t,r,e] | false

  • Code
var_a = [];
foreach var_b in input {var_a.push(var_b);
}
var_a.sort;
while var_c < input.length {if var_a[var_c] != input[var_c] {return false;}var_c++;
}
return true;

Chapter 6 Cyber Attack

You try to help the world by exposing a dirty politician and all you got in return is a stay in jail. What were you thinking? You're going to trial in a few days, and they've got an army of lawyers against you...
phone rings
-Who is this?
-Hey kid, this is Agent D., FBI. Look, we know you're not a bad guy, and you're in a pretty messed up situation right now. We might be able to help.
-Really?
-See, we need more hackers like you around here. So if you're willing to work for us, I'll pull some strings to get you off. What do you say?
-... Do I have a choice?
-Sure, either work for us or spend the next 10 years behind bars.
-Deal, when do I start?
-Right now. We got these guys hacking our systems as I speak. It's driving us mental. Stop them and you're a free man.

Complete

  • Pattern detected
    in |out
    :---:|:---:
    [0,1] | [0,1]
    [1,2] |[0,1,2]
    [3,4,5] | [0,1,2,3,4,5]

  • Code
input.sort;
var_a = [];
while var_b < input[input.length - 1] + 1 {var_a.push(var_b);var_b++;
}
return var_a;

Match

  • Pattern detected
    in |out
    :---:|:---:
    [(,)] | true
    [(,(,)]|false
    [(,(,),)] | true

  • Code
if input[0] == ")" {return false;
}
foreach var_a in input {if var_a == "(" {var_b++;}else {var_b--;}
}
if var_b == 0 {return true;
}
return false;

Rotate

  • Pattern detected
    in |out
    :---:|:---:
    [2,5] | [5,2]
    [3,8,4] |[8,4,3]
    [6,2,9,1] | [2,9,1,6]

  • Code
var_a = [];
while var_b < input.length - 1 {var_a.push(input[var_b + 1]);var_b++
}
var_a.push(input[0]);

Chapter 7 Nuclear Plant

You work for the FBI now, it's not a bad gig, but it can get really stressful. You have millions of lives depending on you right now.
These crazy hackers are trying to blow up a nearby nuclear power plant by messing with the temperature control systems.
Everybody is relying on you to stop their virus and save the country. If you mess up, we all die. No pressure.

Add one

  • Pattern detected
    in |out
    :---:|:---:
    [0,1] | [1,2]
    [1,2] |[2,3]
    [3,6,8] | [4,7,9]

  • Code
while var_a < input.length {input[var_a]++;var_a++;
}
return input;

Positivity

  • Pattern detected
    in |out
    :---:|:---:
    [1] | [true]
    [-1,1] |[false,true]
    [1,-1,1] | [true,false,true]

  • Code
function f1: var_a {if var_a < 0 {return false;}return true;
}
var_b = [];
while var_c < input.length {var_b.push(f1(input[var_c]));var_c++;
}
return var_b;

Nearest to [0,0]

  • Pattern detected
    in |out
    :---:|:---:
    [[10,12],[2,3]] | [2,3]
    [[5,3],[15,0]] |[5,3]
    [[12,3],[6,15],[1,2]]| [1,2]

  • Code
var_a = [];
while var_b < input.length {var_c = pow(input[var_b][0],2) + pow(input[var_b][1],2);var_a.push(var_c);var_b++;
}
while var_d < input.length {if var_a[var_e] > var_a[var_d] {var_e = var_d;}var_d++;
}
var_d--;
return input[var_e];

Chapter 8 Killer Robot

You managed to save the country - you're a national hero.
So when a crazy computer scientist devides it would be a good idea to upload his new self learning AI system into a Mech X5-40, aka the most dangerous robot weapon of all time, everybody comes to you to save the day. Again. This hero thing is really cutting into your WOW time.

Addition

  • Pattern detected
    in |out
    :---:|:---:
    [[2],[3]] | [5]
    [[1,2],[1,9]] |[3,1]
    [[3],[1,2]]| [1,5]

  • Code
while var_a<input.length {var_b = 0;while var_b < input[var_a].length {var_c = var_c + input[var_a][var_b]*pow(10,input[var_a].length-var_b-1);var_b++;}var_a++;
}
var_d = [];
while var_c>0 {var_d.push(mod(var_c,10);var_c=var_c/10;
}
var_e=[];
var_f=var_d.length-1;
while var_f>-1 {var_e.push(var_d[var_f]);var_f--;
}
return var_e;

Match 2

  • Pattern detected
    in |out
    :---:|:---:
    [(,)] |true
    [(,[,),]] |false
    [(,[,],)]| true

  • Code
var_a = [];
if input[0] == ")" || input[0] == "]" {return false;
}
while var_b < input.length {if input[var_b] == "(" || input[var_b] == "[" {var_a.push(input[var_b]);}if input[var_b] == ")" {if var_a[var_a.length-1] =="(" {var_a.pop;}else {return false;}}if input[var_b] == "]" {if var_a[var_a.length-1] =="[" {var_a.pop;}else {return false;}}var_b++;
}
if var_a.length==0 {return true;
}
else {rerurn false;
}

Chapter 9 Skynet

The robot has been neutralized by your virus and dismantled by the FBI. But somehow, the AI that was running it managed to replicate itself across hundreds of data centers, unnoticed... Until today.
It calls itself Skynet, and it has an army of robot marching across the world to terminate the human race. You can hear them outside the building. To stop them, you have to attack the source directly. You must create the most powerful virus you've ever made. And you must act fast.

Tree

  • Pattern detected
    in |out
    :---:|:---:
    [[1,2],[[3,4],5]] |[1,2,3,4,5]
    [[1,2,3],[[4],5]] |[1,2,3,4,5]
    [[1],2,[[3,4,5]]] |[1,2,3,4,5]

  • Code
function f1: var_a,var_b {var_c = 0;while var_c < var_a.length {if var_a[var_c].is_list {f1(var_a[var_c],var_b);}else {var_b.push(var_a[var_c]);}var_c++;}
}
var_d = [];
f1(input,var_d);
return var_d;

Chapter 10 Retirement

Wiah, you stopped skynet. That was... freaking stressful!
You hate this pressure, the job is becoming too much for you. You want to quit and go to a quiet place where you can just relax and play video games all day. You wonder if you can play games on your HackPad...
You'll probably have to write the games yourself... let't see what you can do.

Draw

  • Pattern detected
    in |out
    :---:|:---:
    [1,2] |·
    [3,4] | ·
    [0,0] | ·

  • Code
draw(input[0],input[1]);

转载于:https://www.cnblogs.com/likangzi/p/8821015.html

Hacked【黑客】手游攻略相关推荐

  1. 怎么查看自由幻想服务器返回的信息,自由幻想手游攻略大全 新手攻略技巧汇总[图]...

    自由幻想手游怎么玩,新手如何快速上手,需要有哪些值得注意的地方呢?下面是友情MT为大家带来的自由幻想手游攻略大全,新手攻略技巧汇总,希望能帮助到大家! 自由幻想手游攻略大全 问:玩游戏需要什么配置? ...

  2. linux下玩三国志游戏,我的三国志手游官网版-我的三国志手游攻略-我的三国志手游下载v2.0-Linux公社...

    我的三国志手游为你带来了很好玩的三国手游,玩法超多,玩起来起来非常有趣,操作也是非常的便捷,在我的三国志手游里面大家都可以轻松闯关,在线组队玩,感受到战斗的快乐,我的三国志手游还可以在线招募武将,五星 ...

  3. 怎么写安卓手机脚本_拉结尔手游攻略,云手机全自动挂机刷副本及装备

    腾讯最近的游戏出的是相当勤快啊,剑网3指尖江湖全面公测才一个星期,暗黑类手游大作拉结尔就开始正式公测了.这次测试腾讯应该吸取了剑三公测时的教训,准备的比较充分,游戏按时开服,进入游戏也没有出现掉线延迟 ...

  4. 无尽战记手游超能辅助脚本工具 无尽战记手游攻略介绍

    无尽战记是一款全新的科幻风3DARPG手游,主打游戏打击感单机游戏.怀旧的风格,绚丽的特效,加上八大特色功能(激战BOSS.翅膀飞升.PK抢夺.绝世神兵.交易拍卖.英雄助战.华丽时装.多人团战)叫人跃 ...

  5. 什么?跑跑卡丁车明天要出手游了?电脑玩跑跑卡丁车手游攻略提前看

    <跑跑卡丁车手游竞速版>什么时候上线?十几年前的跑跑卡丁车网游有多火?我只能说在当时是击败腾讯QQ飞车的存在.现在,由世纪天成研发,腾讯联合发行的跑跑卡丁车手游竞速版将在7月2日也就是明天 ...

  6. 绝地求生:刺激战场正式服上线!电脑玩刺激战场手游攻略看过来

    PUBG联合腾讯光子研发<绝地求生:刺激战场>正版手游,极致还原端游体验的正版手游2月9日10点正式服首发上线.安卓版本全平台开测,IOS版本最终上线时间未定.  绝地求生:刺激战场官方微 ...

  7. 未转变者怎么重置服务器,未转变者怎么把服务器关掉 | 手游网游页游攻略大全...

    发布时间:2017-09-18 我的世界1.9服务器大全 2016最新最好玩的服务器.下面就是我的世界1.9版本的服务器推荐啦!那要知道我的世界1.9版本上线也没有多长时间哦~所以服务器不是很多,资源 ...

  8. 梦幻群侠传5帮派修炼_梦幻封妖传5门派技能介绍 | 手游网游页游攻略大全

    发布时间:2015-12-25 手游封妖任务及奖励介绍,手游封妖任务怎么做有什么奖励那? 活动时间:全天 参与次数:10次/天 任务形式:组队或单人 等级限制:达到25级: 任务描述:挖藏宝图后可能会 ...

  9. 我的世界服务器指令修复耐久,我的世界修改装备耐久度指令 | 手游网游页游攻略大全...

    发布时间:2017-05-05 我的世界火焰蔓延无伤害了 教你怎修改火焰蔓延指令.那下面的这个攻略则是可以将我的世界里面的火焰蔓延效果造成的伤害忽视掉,那到底是一个盛宴的方法,可以让我们避免受火焰蔓延 ...

最新文章

  1. python3 turtle_最新版Python 3.8.6 版本发布,跨界程序员零压力学Python之道!(附下载)...
  2. 关于node.js的进程管理
  3. redis 经纬度_原来用Redis实现查找附近的人这么容易
  4. 初学者怎样看懂python代码_Python零基础入门-(如何让人读懂你的代码)文档注释
  5. jQuery 遍历后代
  6. python2.7 + selenium3.4.3浏览器的选择
  7. Thymeleaf中使用select进行消息回显时提示:Exception evaluaating SpringEL expression
  8. acm之vim的基本配置
  9. win10下安装和卸载Ubuntu双系统
  10. 如何优化WebAPP性能:从五个层面上彻底优化前端项目性能
  11. windows下安装qt4.7,编译hello QT 成功。
  12. 客户端与服务器端的认证方式(cookie,token,session)
  13. linux qt目录查看,QT遍历目录获取文件信息
  14. Kafka踩坑 - Couldn't find leaders for Set
  15. 魔客吧php登录界面模板,精仿魔客吧网站模板discuz模板_带VIP购买等多个插件
  16. 车载syu一android密码,教务系统找回密码
  17. java aspose 导出word_aspose.words导出html 转word文档带图片,(无网络也可以看图)
  18. 两数之和:找出给定数组中和是给定目标整数的两个整数,输出找到的两个整数下标
  19. Android 手游聚合SDK那些事
  20. 岛屿问题 通用解-463.岛屿周长-200.岛屿数量-695.岛屿的最大面积-827.最大人工岛

热门文章

  1. Linux-CentOS 安装yasm
  2. Mysql增加传输数据量或连接时间,防止mysql server has gone away报错
  3. 使用递归方法查询所有分类(一)
  4. 小项目2——(未登录)指定微博账号基本公开信息的搜集
  5. 应聘Java笔试时可能出现问题库及其答案(最全版)
  6. unity 许可证即将到期_了解Unity即将推出。
  7. 正则表达式,兼容正整数或负整数的写法
  8. 从《三体》到Silkpunk,这些中式科幻用什么打动了西方人?
  9. 3年功能测试经验,面试想拿到15k很难吗?
  10. [App] FTP 命令全集