問題一覧 > 教育的問題

No.3353 Computing Liouville's Constant

レベル : / AI推定難易度 : 130 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 72
作問者 : 👑 p-adic / テスター : twitteryou
お気に入りにしたユーザー ProblemId : 11955 / 自分の提出
問題文最終更新日: 2025-05-29 09:13:13
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 488 小数誤差コンテスト (順位表) の他の問題:

Problem Statement

You are given a positive integer $N$.

 

Liouville's constant is the real number defined by the infinite sum

$\displaystyle \sum_{i=1}^{\infty} 10^{-i!} $

and it is uniquely represented as a decimal fraction in base ten as

0.1100010000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010...

(shown up to the $121$-st digit after the decimal point).

 

Find the $N$-th digit after the decimal point of Liouville's constant.

Input

The input is given from standard input in $1$ line in the following format:

  • Line $1$ contains $N$.
$N$

Constraints

The input satisfies the following constraints:

  • $N$ is an integer satisfying $1 \leq N \leq 100$.

Output

Print the $N$-th digit after the decimal point of Liouville's constant in $1$ line.

Print a newline at the end.

Sample

Sample 1
Input
1
Output
1

The $1$-st digit after the decimal point of $0.1100010000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010 \cdots$ is $1$.

Sample 2
Input
2
Output
1

The $2$-nd digit after the decimal point of $0.1100010000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010 \cdots$ is $1$.

Sample 3
Input
3
Output
0

The $3$-rd digit after the decimal point of $0.1100010000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010 \cdots$ is $0$.

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。