Logo
(追記) (追記ここまで)

15222번 - nnnnn 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB3791053724.183%

문제

Hsara and Simone like to communicate without anyone else knowing what they’re saying. This time, Simone invented a very sneaky cipher. When she wants to tell Hsara a non-negative number n, she performs the following encryption procedure.

Let d(n) denote the decimal expansion of n. Consider the string x := d(n)n , i.e., the decimal expansion of n concatenated with itself n times. The encryption of n is then the length of x.

As an example, assume Simone wants to encrypt the number 10. Then

x = 10101010101010101010.

The length of x is then 20, which will be the encrypted value of x.

Hsara had no problem writing a decryption algorithm for this procedure. But can you?

입력

The first and only line contains an integer L (0 ≤ L ≤ 10106), the encrypted value of some non-negative integer n.

출력

Output a single line containing the integer n.

제한

예제 입력 1

20

예제 출력 1

10

힌트

출처

Contest > KTH Challenge > KTH Challenge 2016 H번

  • 문제를 만든 사람: Johan Sannemo
(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /