challenges

Some problem solving programming challenges, i have solved. Not all are here, but started adding them slowly.

This project is maintained by chankruze

Digits of Pi

The constant Pi is defined as the ratio of a circle’s circumference to its diameter. Pi is an irrational number, meaning that it’s digits never end or repeat in any known way.

Task

Given an integer N as input, find and output the Nth decimal digit of Pi.

Input Format

An integer: 0 < N < 1000

Output Format

An integer, representing the Nth decimal digit of Pi.

Sample Input

12

Sample Output

9

Explanation

The 12th decimal digit of Pi is 9: 3.141592653589793…

Solutions

Language Solution
C not available
CPP not available
C# not available
Python available
Java not available
Ruby not available
Swift not available