Skip to main content

Solutions of Game-"Hacked"

Here comes the solutions of various levels of the game "Hacked". Its available in Android Play Store- The first coding game on smart phones.
Solutions for various levels and corresponding sub levels are given below which can be referred if needed. Go, enjoy the game.

THE HACKPAD
Increment me
input + 1

Positive
input > 0;

Absolute
if input < 0 {
     return -input;
}
return input;

Absolute 2
abs(input);

HIGH SCHOOL HACK
Power
while var_a < input {
     var_b = var_b + input;
     var_a++;
}
return var_b;

Power 2
pow(input,2);

Length
foreach var_a in input{
     var_b++;
}
return var_b;

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

JAIL BREAK
Max
foreach var_a in input{
     if var_a > var_b {
          var_b = var_a;
     }
}
return var_b;

Max 2
foreach var_a in input{
     var_b = max(var_b,var_a);
}
return var_b;

This is Odd
while input > 1 {
     input = input - 2;
}
return input;

A man, a plan, a canal, panama
foreach var_a in input{
     if var_a != input.pop{
          return false;
     }
}
return true;

CHEATCODE
Bringing come order
while var_a <input.length {
     var_b = var_a + 1;
     while var_b <input.length {
          if input[var_b] <input [var_a] {
               var_c = input[var_b];
               input[var_b] =input[var_a];
               input[var_a] = var_c;
          }
          var_b++;
     }
var_a++;
}
return input;

Missing numbers
var_a = [];
foreach var_b ininput.sort {
     while var_b != var_c {
          var_a.push(var_c++);
     }
     var_c++; 
}
return var_a;

Anagrams
var_a = "";
foreach var_b in input{
     if var_a != var_b.sort&& var_a != "" {
          return false;
     }
     var_a = var_b;
}
return true;

CORRUPTED
110101110101000101
var_a = input.length-1;
while var_a > -1 {
     var_b = var_b +input[var_a]* pow(2,input.length - var_a - 1);
     var_a--;
}
return var_b;

Prime
if input == 1 {
     return false;
}
var_a = 2;
while var_a < input {
     if mod(input, var_a) == 0 {
          return false;
     }
var_a++;
}
return true;

Number in order
while var_a <input.length - 1 {
     if input[var_a] >input[var + 1] {
          return false;
     }
     var_a++;
}
return true;

CYBER ATTACK
Complete
while var_a < input.length {
     var_b = var_a;
     while var_b != input[var_a] {
          input.insert(var_a++, var_b++);
     }
     return input;
}

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

Rotate
return input.push(input.remove(0));

NUCLEAR PLANT
Add one
while var_a<input.length{
     input [var_a]=input [var_a]+1;
}
return input

Positivity
var_b = [];
foreach var_a in input{
     var_b.push(var_a > -1);
}

Neareat to [0,0]
function f1: var_a {
     return var_a[0] + 1 *var_a[1] + 1;
}
foreach var_a in input{
     if var_b == 0 || var_b> f1(var_a) {
          var_c = var_a;
          var_b = f1(var_a);
     }
}
return var_c;

KILLER ROBOT
Addition
function f1: var_a {
     foreach var_b in var_a {
          var_c = var_c * 10 + var_b;
     }
return var_c;
}
var_b = f1(input[0]) + f1(input[1]);
var_a = [];
var_c = var_b / 10;
if var_c > 0 {
     var_a.push(var_c);
}
var_a.push(mod(var_b, 10));

Match2
var_a = [];
foreach var_b in input{
     if var_b == "(" || var_b == "[" {
          var_a.push(var_b);
     }
     else {
          if var_a.length == 0 {
               return false;
          }
          var_c = var_a.pop;
          if var_c == "(" && var_b != ")" {
               return false;
          }
          if var_c == "[" && var_b != "]" {
               return false;
          }
     }
}
return var_a.length == 0;

SKYNET
Tree
function f1: var_a,var_b {
     if var_b.is_list {
          while var_b.length > 0 {
               f1(var_a,var_b.remove(0));
          }
     }
     else {
          var_a.push(var_b);
     }
return var_a;
}
f1([], input);

RETIREMENT
Draw
draw(input [0], input[1]);

Comments

Popular posts from this blog

SNIFF GSM USING HACKRFX

​TOOLS  USED: •  ha ckrf_kali • brategnuradio-companion • gr-gsmgqrx • wireshark INSTALL REQUIREMENTS: First thing, you want to make sure you have all the required software installed, you can install most of them and their dependencies using your distribution package manager. Let’s start with the libraries and tools for the hackrf itself, on a Debian/Ubuntu distro you’ll install them like so: sudo  apt-get install  hackrf   libhackrf -dev libhackrf0 Once these libraries are installed, you can plug your hackrf into one of your USB ports and execute the  hackrf_info  command, at this point you should see something like the following: # hackrf_info Found  HackRF  board. Board ID Number: 2 ( HackRF  One) Firmware Version: 2014.08.1 Part ID Number: 0x00574746 0x00574746 Serial Number: 0x00000000 0x00000000 0x14d463dc 0x2f4339e1 You will now install  gnuradio  which is the software we’ll use to decode the RF signals,...

MORE ABOUT RANSOMWARES. PART 1

 Not long ago, a man committed suicide after an automatically generated notice from a computer virus threatened him with jail unless he paid a ransom thousands of dollars. The year was 2014. As incredible as the story seems, it marked the first known time a computer virus actually killed somebody. The next generations stole cash from users around the globe, and Cryptolocker raised the stakes – holding data of hundreds of thousands of users hostage. Despite successive short-lived take downs, the malware has made a comeback as CTB (Curve-Tor-Bitcoin) Locker. This challenging breed of malware is continuously improving, reaching new levels of complexity as smartphones and tablets are increasingly used to store crucial personal and enterprise-level documents. Bitdefender, the anti-malware solutions provider, zooms in on the subject to show how this type of virus works and to tell users how to prevent being locked out and extorted. What is ransomware? Ransomware is a type of malware th...

SHE, HE TOLD ABOUT

Her handwriting was so beautiful. Each letter had it's own boldness, elegance and I loved to look at them. A pen and a white space, even in a notice, was enough for her to begin. She would write and then look at it, enjoys it's beauty, goes into a serious thought and ends with a small smile. Every of those sequential actions I remember. It is so normal, universal and a must go reality that time moves foreward. Ages, days, hours, everything passes. My happiness on seeing those fonts kept on changing its demensions. My skin began to paint itself lines and so do she. Still, she wrote. But now there is a difference. As timestamps move, the interpretations made by my brain on those texts perplexed from simple happiness to pride, then to a feeling of belongingness, to love, to possessiveness, to responsibility to trust, to many other emotions for which I am weak in English to find words to substitute for and finally to a fear; a fear of death. Wrong. Perfectly wrong. Its not fear. ...