HCI '16 - Pi Digits

View as PDF

Submit solution

Points: 30
Time limit: 10.0s
Memory limit: 64M

Authors:
Problem type

Calculate π to N digits. That's all. :) (really)

Input Specification

N: Number of digits of π to compute

Output Specification

A single line containing N non-space separated digits of π, with no decimal point. Do not round the last digit, just truncate it.

Constraints

Subtask 1 [20%]

N=800

Subtask 2 [20%]

N=5000

Subtask 3 [60%]

N=10000000

Sample Input

Copy
5

Sample Output

Copy
31415

Comments


  • 4
    passman300  commented on Jan. 16, 2022, 2:56 p.m. edited

    Probably need "chudnovsky algorithm".