# Encryption | 23 Oct 2009

Discussion in '\$1 Daily Competition' started by shabbir, Oct 23, 2009.

Joined:
Jul 12, 2004
Messages:
15,296
366
Trophy Points:
83
((run)/(these)) nails down to 187 / 5703 Then what would be for ((google)/(yahoo))

2. ### xpi0t0sMentor

Joined:
Aug 6, 2004
Messages:
3,012
203
Trophy Points:
63
Occupation:
Senior Support Engineer
Location:
England
49/50.

3. ### xpi0t0sMentor

Joined:
Aug 6, 2004
Messages:
3,012
203
Trophy Points:
63
Occupation:
Senior Support Engineer
Location:
England
No, 49/5. One dp out (d'oh!). Getting careless in my old age.

('r'-'a'+i)*('u'-'a'+i)*('n'-'a'+i)=187 when i=3
('t'-'a'+i)*('h'-'a'+i)*('e'-'a'+i)*('s'-'a'+i)*('e'-'a'+i)=5703 when i=3

So if i==3,
('g'-'a'+i)*('o'-'a'+i)*('o'-'a'+i)*('g'-'a'+i)*('l'-'a'+i)*('e'-'a'+i)=2294082
('y'-'a'+i)*('a'-'a'+i)*('h'-'a'+i)*('o'-'a'+i)*('o'-'a'+i)=234090
2294082/234090=9.8, or 98/10, or 49/5.

4. ### nimeshNew Member

Joined:
Apr 13, 2009
Messages:
770
20
Trophy Points:
0
Occupation:
Location:
Mumbai
nice one xpt, but didn't get the logic

'r'-'a' ???

5. ### SaswatPadhi~ Б0ЯИ Τ0 С0δЭ ~

Joined:
May 5, 2009
Messages:
1,343
55
Trophy Points:
0
Occupation:
STUDENT !
Location:
Orissa, INDIA
@xpi0t0s :

Yeah, even I didn't get the logic ... :?
The following code uses the "encryption" method you mentioned :
Code:
```#include <stdio.h>

int main()
{
char Decoded[50];
unsigned int Value;
int delta;

Decoded[0]='O';
while(Decoded[0] != '0')
{
scanf("%s", Decoded);
scanf("%d", &delta);
Value = 1;
for(int i = 0; Decoded[i] != '\0'; ++i)
Value *= (Decoded[i]-'a'+delta);
printf("%d\n\n", Value);
}
return 0;
}```
When I run it ...
Code:
```[B]run 3[/B]
[COLOR="Red"]7360[/COLOR]

[B]these 3[/B]
[COLOR="Red"]226380[/COLOR]

[COLOR="SeaGreen"]2294082[/COLOR]

[B]yahoo 3[/B]
[COLOR="SeaGreen"]234090[/COLOR]
```
The values in red, don't match with 187 and 5703 respectively. Those is green match perfectly with the values you predict as per your encryption scheme.

And, 7360 / 226380 == 368 / 11319 in the simplest form. That might be close to 187/5703 but not equal to it.

Joined:
Jul 12, 2004
Messages:
15,296
366
Trophy Points:
83
Hint : Think in simple terms

Joined:
Aug 6, 2004
Messages:
3,012