#K38297. Find the N-th Digit of Pi
Find the N-th Digit of Pi
Find the N-th Digit of Pi
In this problem, you are given a single integer ( n ) that represents the position of a digit in the decimal part of ( \pi ). The first decimal digit of ( \pi ) corresponds to ( n = 1 ), the second to ( n = 2 ), and so on. For this problem, ( \pi ) is approximated to twenty decimal places: ( \pi \approx 3.14159265358979323846 ).
Your task is to output the ( n )th digit from the decimal part of ( \pi ). If ( n ) is not between 1 and 20 (inclusive), print an error message: "The value of n should be between 1 and 20".
inputFormat
The input is provided via standard input (stdin) and consists of a single integer ( n ).
outputFormat
Output via standard output (stdout) the ( n )th digit of the decimal portion of ( \pi ) if ( 1 \leq n \leq 20 ). Otherwise, output the error message: "The value of n should be between 1 and 20".## sample
1
1