私信TA
用户名:dzc21
访问量:52820
签 名:
CSDN博客:http://blog.csdn.net/qq_38712932
自我简介:
CSDN博客:http://blog.csdn.net/qq_38712932 个人博客:http://www.eternallyc.top/blog/index
作者: Agony 发表时间:2017-07-26 15:04:24 浏览:692 | 评论:0
解题思路:注意事项:参考代码:
#include <cstdio>
#include <algorithm>
using namespace std;
int main()
{
int a=2;
int n;
scanf("%d",&n);
int sum= 0;
for(int b = 0;b < n;b ++)
sum+=a;
a=a*10+2;
}
printf("%d",sum);
return 0;
0.0分
0 人评分