Preparando MOJI

DMCA

1000ms 262144K

Description:

Many people are aware of DMCA – Digital Millennium Copyright Act. But another recently proposed DMCA – Digital Millennium Calculation Act – is much less known.

In this problem you need to find a root of a number according to this new DMCA law.

Input:

The input contains a single integer $$$a$$$ ($$$1 \le a \le 1000000$$$).

Output:

Output the result – an integer number.

Sample Input:

1

Sample Output:

1

Sample Input:

81

Sample Output:

9

Informação

Codeforces

Provedor Codeforces

Código CF1505B

Tags

*specialimplementationnumber theory

Submetido 0

BOUA! 0

Taxa de BOUA's 0%

Datas 09/05/2023 10:12:21

Relacionados

Nada ainda