Victory


私信TA

用户名:Zhang0920Yao

访问量:1162

签 名:

.......

等  级
排  名 4088
经  验 1705
参赛次数 0
文章发表 3
年  龄 24
在职情况 在职
学  校 贵州商学院
专  业 物联网工程

  自我简介:

解题思路: 

注意事项:输入整数及其个数的范围条件

参考代码:

#include <stdio.h>

#include <math.h>

int main(int argc, char *argv[]) {

int a,n,t=0,i=0;

long int s = 0;

scanf("%d %d",&a,&n);

if(((a>=1)&&(a<=9)) && (n>=1)&&(n<=9)){

while(i<n){

t = a*pow(10,i)+t;

s += t;

i++;

}

}

printf("%ld",s);

return 0;

}


 

0.0分

0 人评分

看不懂代码?想转换其他语言的代码? 或者想问其他问题? 试试问问AI编程助手,随时响应你的问题:

编程语言转换

万能编程问答  

代码解释器

代码纠错

SQL生成与解释

  评论区