Untitled

mail@pastecode.io avatar
unknown
c_cpp
a year ago
419 B
4
Indexable
Never
#include<stdio.h>

#include<stdlib.h>

#include<math.h>

int main()

{

    long long int n,i=0,j=0;

    scanf("%lld",&n);

    while(n!=i)

    {

        while (n!=0)

        {

            i=i*10+n%10;

            n/=10;

        }

        while (n!=i)

        {

            j++;

            n=n+i;

        }

        printf("%lld\n",j);

    }

    return 0;

}