Back
Close

Squash Pi

Statement

 Goal

Print out the requested digits of pi.

Hint: The easiest way to solve this is to just store the first 295k digits of pi in your program. But you are limited to 100k characters, so it is 'easy' but not 'very easy'.
Input
First line: The INDEX of the first digit of pi to print.
Second line: The number of digits to print N .
Output
One line with the requested sequence.
Constraints
INDEX < 295,000
N <= 50
Example
Input
0
10
Output
3141592653

Tags

Difficulty
Easy

Test cases
Test 1 Test
Input
0 10
Output
3141592653

Validator 1 Validator
Input
1343 10
Output
5019351125

Test 2 Test
Input
79200 20
Output
23071751132961904559

Validator 2 Validator
Input
79652 20
Output
37495250249302235148

Test 3 Test
Input
164587 30
Output
363064633704503315526375204047

Validator 3 Validator
Input
215155 30
Output
664949241053953017401360785889

Test 4 Test
Input
251666 40
Output
7165613533509921885956010788152195599298

Validator 4 Validator
Input
247117 40
Output
6222516895973476817428512737721348884312

Test 5 Test
Input
294641 50
Output
86749705669639627505283727439791628764864557681076

Validator 5 Validator
Input
294480 50
Output
82389906171845816823966993940423403802715214934164

Solution language

Solution

Stub generator input