Go4Expert (http://www.go4expert.com/)
-   \$1 Daily Competition (http://www.go4expert.com/contests/daily-competition/)
-   -   Encryption | 23 Oct 2009 (http://www.go4expert.com/contests/encryption-23-oct-2009-t19868/)

 shabbir 23Oct2009 19:50

Encryption | 23 Oct 2009

((run)/(these)) nails down to 187 / 5703 Then what would be for ((google)/(yahoo))

 xpi0t0s 23Oct2009 21:13

Re: Encryption | 23 Oct 2009

49/50.

 xpi0t0s 23Oct2009 21:21

Re: Encryption | 23 Oct 2009

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.

 nimesh 24Oct2009 02:25

Re: Encryption | 23 Oct 2009

nice one xpt, but didn't get the logic

'r'-'a' ???

Re: Encryption | 23 Oct 2009

@xpi0t0s :

Yeah, even I didn't get the logic ... :? :confused:
The following code uses the "encryption" method you mentioned :
Code: CPP

`#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:

```run 3 7360 these 3 226380 google 3 2294082 yahoo 3 234090```
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.

 shabbir 24Oct2009 19:02

Re: Encryption | 23 Oct 2009

Hint : Think in simple terms

 xpi0t0s 26Oct2009 02:15

Re: Encryption | 23 Oct 2009

yeah I'm way out. Anyway I'm sticking with my guess of 49/50.