#P2785. 物理1(phsic1)- 磁通量

物理1(phsic1)- 磁通量

Description

In front of the newbie HansBug is a peculiar magnetic field region in the shape of a polygon, described by a sequence of NN points, which are the vertices of the region in order. Now HansBug wants to know the magnetic flux of this region. However, his brain cells and luck have been depleted, so this high-end task is left to you.

Input Format

The first line contains an integer NN and a real number BB, where BB is the magnetic flux density.

Lines 2N+12\sim N+1 each contain two real numbers, representing the xx and yy coordinates of a point.

Output Format

Output one line containing a real number: the magnetic flux (rounded to 4 decimal places).

3 1
0 0
1 0
0 2

1.0000
4 1
1 1
1 -1
-1 -1
-1 1

4.0000

Hint

Magnetic flux == magnetic flux density ×\times area of the magnetic field region.

0<B100\lt B\le 10.

Translated by ChatGPT 5