#include <stdio.h>
#include <stdlib.h>

int main()
{
    int digit_seen[10] = {0}, a[10] = {0};
    int digit, b = 0;
    long int n;

    printf("请输入数字:");
    scanf("%ld", &n);

    while(n > 0)
    {
        digit = n % 10;
        if(digit_seen[digit] >= 1)
        {
            a[digit] =a[digit] + 1;
            b = 1;
        }
        else
        {
            digit_seen[digit] = 1;
        }

        n /= 10;
    }


    if(b == 1)
    {
        printf("有重复数字:");

        int i;

        for(i = 0; i <= 9; i++)
        {
            if(a[i] > 1)
            {
                printf("%d ",i);
            }

        }
    }
    else
    {
        printf("没有重复数字\n");

    }

    return 0;
}