题目链接:http://bailian.openjudge.cn/practice/2940
# include <stdio.h>int main()
{int Sn,a,a_back,n;int i;scanf("%d%d",&a,&n);a_back=a; Sn=a;for(i=1;i<n;i++){a=a*10+a_back;Sn=Sn+a;}printf("%d\n",Sn); return 0;
}
题目链接:http://bailian.openjudge.cn/practice/2940
# include <stdio.h>int main()
{int Sn,a,a_back,n;int i;scanf("%d%d",&a,&n);a_back=a; Sn=a;for(i=1;i<n;i++){a=a*10+a_back;Sn=Sn+a;}printf("%d\n",Sn); return 0;
}