Vincent Massey SS - 2014 Senior Contest #1

Problem C: Mohan's Physics Problem

Despite Mohan’s tests being hard enough, you realized after you started that you forgot your calculator! You work out the answer to the quantum physics question to be nk. Although you don’t have a calculator, you have your laptop at your disposal. You decide to write a program to solve the answer for you.

Given n and k, find the value of nk expressed in scientific notation.

Input Format

Two space-separated integers, n and k (2 ≤ n ≤ 100; 1 ≤ k ≤ 500,000).

Output Format

Print the value of nk using scientific notation. Print the significand on the first line and the exponent on the next. The significant must be rounded and displayed to 3 significant digits.

Sample Input

2 8

Sample Output

2.56
2

All Submissions
Best Solutions


Point Value: 7
Time Limit: 2.00s
Memory Limit: 16M
Added: Nov 04, 2014
Author: thorthugnasty

Languages Allowed:
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3

Comments (Search)

wow, this should be worth more
Edit: so how should i approach/do this then? can you give me some tips?

Nope, that's not the key.

The test cases in the original contest were weak, so a new test case is added and solutions are rejudged.

Thanks Alex...