Walkthrough of Hacked -【黑客出击】编程游戏攻略

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,
  • 12
    点赞
  • 20
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值