Under construction

Still being built. Things may change

The Professor's Calculator Is Broken!

Interview

Time limit1sMemory limit512 MB

Summary
Multiply N pairs of decimals given to 9 places and print each product with exactly 18 digits after the decimal point, no exponent notation.
Level

Medium4 of 10

Topics
Math, Implementation, String, Brute force
Solved
No attempts yet

Problem

Puangi, a freshman at Chung-Ang University, built a calculator that handles decimals as an assignment for his Introduction to Computer Programming professor. One hour before the deadline, Puangi noticed that the calculator only computes accurately to the 6th decimal place. The professor, however, offers bonus points for computing to the 18th decimal place, and Puangi wants those bonus points to earn an A+.

Help Puangi earn an A+!

N lines each contain 2 decimals.

Print the product of the two decimals exactly to the 18th decimal place.

Input

The first line contains N (1 ≤ N ≤ 1000).

Each of the next N lines contains two decimals A and B (-4 ≤ A, B ≤ 4).

The decimals A and B are always given to the 9th decimal place. ex) 1.000000000, -0.000000001

Output

Print the product of the two decimals exactly to the 18th decimal place.

The answer must always be printed to the 18th decimal place. ex) 1.000000000000000000

Hint

Note that you must not use exponential notation such as 0E-18 when printing.

Examples2

  1. Example 1

    Input
    3
    -2.191956222 -0.683960516
    -1.291834802 3.782364395
    -1.598010574 -2.335316422
    
    Expected output
    1.499211508648530552
    -4.886189959306674790
    3.731860335991846228
    
  2. Example 2

    Input
    10
    -2.172553565 -1.244524445
    -1.657717583 -1.359125652
    2.966396874 -0.280475498
    -2.418245262 -1.999745225
    2.754341475 -1.176239263
    -1.354440277 -0.737219668
    3.677042302 -0.840169475
    -1.401401708 1.772821560
    0.408919935 -0.554763559
    3.867584500 2.556471486
    
    Expected output
    2.703796019714396425
    2.253046490826739116
    -0.832001640500793252
    4.835874415563373950
    -3.239764586604332925
    0.998520011335768036
    -3.089338700424131450
    -2.484435162163224480
    -0.226853878486648665
    9.887369493945567000