4 kyu

Calculate k-th digit of π (Pi)

27 of 135groskowski

Description:

The simple task

You have to calculate k-th digit of π, knowing that:

π = 3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342...

Make sure to check the anti-cheat rules at the bottom.

Examples

For k = 0:
3.14159265358979323...
^
For k = 6:
3.14159265358979323...
       ^

Constraints

0 <= k < 10000

Random test cases

1000 tests where 0 <= k < 10000

Anti-cheat

  • The only import allowed in Python is math
  • The code length is limited to 2000 characters.
  • Words http, www, requests, gmpy2 and search are banned.
  • Eval and exec are banned
  • Only ASCII characters are allowed
Number Theory

Stats:

CreatedOct 24, 2022
PublishedOct 25, 2022
Warriors Trained1401
Total Skips80
Total Code Submissions3178
Total Times Completed135
Java Completions27
Python Completions114
Total Stars64
% of votes with a positive feedback rating90% of 46
Total "Very Satisfied" Votes39
Total "Somewhat Satisfied" Votes5
Total "Not Satisfied" Votes2
Total Rank Assessments5
Average Assessed Rank
4 kyu
Highest Assessed Rank
4 kyu
Lowest Assessed Rank
6 kyu
Ad
Contributors
  • groskowski Avatar
  • Ciprian Amza Avatar
Ad