输出超限了是怎么回事?以及如何限定输入数字的位数?

#include
int main(void)

{
int a;
int b;
(省略了)

while (1)
{
    scanf_s("%d(过审核省略d)", &a);
    scanf_s("%d(同上)", &f);
    printf("%d", (a + f)*10000+( b + g)*1000+(c + h)*100+( d + i)*10+( e + j));
}
return 0;

}

输出超限了是怎么回事?如何限定输入数字的位数?
(为什么%d会因为重复过不了审核)

int改成改成long long。输出用%lld
limits.h中保存着一个类型的最大值和最小值。
#define INT_MAX 2147483647
#define LONG_MAX 2147483647L
#define LLONG_MAX 9223372036854775807i64