#P1729. 计算e

计算e

Description

"Yueluo Wuti" actually replied with 10,000 digits after the decimal point of π\pi so quickly?! Impossible—he must have asked someone. The master "Love and Sorrow" makes it difficult for "Yueluo Wuti" again: "Help me compute the first nn digits after the decimal point of ee (n10000n \le 10000), hurry!!!" "Yueluo Wuti" wants to ask someone, but he finds that talking to you just now has drained his phone battery. At this critical moment, he can only rely on himself. If you were him now, how would you write this program?

Input Format

Only one line: nn.

Output Format

Multiple lines.

First line: 22.

Starting from the second line: the fractional part of ee. Insert a space after every 10 digits, and a newline after every 50 digits.

100
2.
7182818284 5904523536 0287471352 6624977572 4709369995
9574966967 6277240766 3035354759 4571382178 5251664274

Hint

30% testdata: n1000n \le 1000.
100% testdata: n10000n \le 10000.

Time limit: 1 second.

Translated by ChatGPT 5