UVa: 113 (Power of Cryptography)

Power of Cryptography

Data type:

We have to find out the value of K. After a simple Calculation we can say,
Kn = p
K = e log (p) / n

another formula: [by Saidul Islam]
pow (p, 1/n);

In C/C++, if we write

printf ("%0.lf", K);

output will be an integer looking double range number

One thought on “UVa: 113 (Power of Cryptography)

  1. here value of k is given we need to find n…so how 3^2=9 doesn’t mean 2^3=9(8) i.e(consider 2^4=16 given 2 and 16 we need to find 4 )

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s