QOJ.ac

QOJ

時間限制: 1 s 記憶體限制: 512 MB 總分: 100

#3470. nnnnn

统计

Hsara 和 Simone 喜欢在不让其他人知道他们在说什么的情况下进行交流。 这一次,Simone 发明了一种非常隐蔽的加密方式。当她想告诉 Hsara 一个非负整数 $n$ 时,她会执行以下加密过程:

令 $d(n)$ 表示 $n$ 的十进制表示。考虑字符串 $x := d(n)^n$,即 $n$ 的十进制表示与其自身连接 $n$ 次。$n$ 的加密值即为 $x$ 的长度。

举个例子,假设 Simone 想加密数字 $10$。那么 $$x = 10101010101010101010$$ $x$ 的长度为 $20$,这就是 $x$ 的加密值。

Hsara 毫无困难地写出了这个过程的解密算法。但你能做到吗?

输入格式

输入的第一行也是唯一一行包含一个整数 $L$ ($0 \le L \le 10^{10^6}$),表示某个非负整数 $n$ 的加密值。

输出格式

输出一行,包含整数 $n$。

样例

样例输入 1

20

样例输出 1

10

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.