Skip to content

C++ Mystery Cache

This cache has been archived.

ashtri_TM: aj, lobis beveik 5 metus gyvavo, kas norejo tas surado, o kas ne tai ne, RIP 🪦

More
Hidden : 5/7/2019
Difficulty:
4.5 out of 5
Terrain:
1.5 out of 5

Size: Size:   micro (micro)

Join now to view geocache location details. It's free!

Watch

How Geocaching Works

Please note Use of geocaching.com services is subject to the terms and conditions in our disclaimer.

Geocache Description:


[LT] Net nemeginkit eiti i nurodytas koordinates !

Lobio duotose koordinatese nerasite,

kad rastumet finalini konteineri reikes isspresti uzduoti.

Konteineris NANO, tai taupykit vieta logbook'e,

pats lobis nera kazkuo labai ypatingas,

siuo lobiu norejau patikrinti kiek lobiautoju sugebes isspresti su programavimu susijusi klaustuka.

Gauti galutinems koordinatems apskaiciuokite abc ir xyz kintamuju reiksmes zemiau pateiktame kode.

Jeigu pasileisite duota koda nieko netgi nereikes skaiciuoti,

programa pati parasys atsakyma.

Bet, kad nebutu per daug lengva, palikau kelias grubias klaidas, kurias mokanciam skaityti koda rasti neturetu buti sunku.

 

Vieta: Tarptautinis Kauno oro oustas.

 

 

[EN] Don't even try to go to posted coordinates !

You will not find the cache in the given coordinates,

to find final container you'll have to solve the task.

Container is NANO, so save space in logbook,

cache itself is not very special,

with this cache I wanted to see how many geocachers will be able to solve code programming related mystery.

To get final coordinates calculate abc and xyz variables values in code given below.

If you'll run given code you won't even have to calculate anything,

program will output the answer.

But I've left few nasty bugs so that it wouldn't be to easy.

Someone who can read code should be able to detect those bugs easily

 

Place: International Kaunas airport.

 

 

UZDUOTIS / TASK :

 

string txt = "TO GET FINAL COORDINATES, CALCULATE abc AND xyz VALUES:";

int abc = 0;

int xyz = 999;

 

int i;

for (i=9; i>0; i--)

   abc += 5;

   xyz -= 7;

}

 

abc = xyz / i;

 

switch (abc) {

   case 0:

      abc += abc * 3;

      xyz -= abc;

   break;

 

   case 25:

      abc += 105;

      xyz -= abc * 2;

   break;

 

   case 45:

      abc = abc * 2;

      xyz -= abc * 2;

   break;

 

   default:

      abc += 75 * 3;

      xyz -= 200;

   break;

}

 

xyz -= txt.length() * 4;

 

while (i < 8) {

   abc += 3;

   xyz -= 5;

   i++;

}

 

xyz += abc;

xyz -= 100;

abc++;

 

cout << txt[9] << " 54 " << 50+i << txt[24] << abc << '\n';

cout << txt[4] << " 24 " << i/2 << txt[24] << xyz;

Flag Counter

Additional Hints (Decrypt)

RYBC

Decryption Key

A|B|C|D|E|F|G|H|I|J|K|L|M
-------------------------
N|O|P|Q|R|S|T|U|V|W|X|Y|Z

(letter above equals below, and vice versa)