Wrong Answer
/in/foo.c: In function 'main': /in/foo.c:8:10: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'long long int *' [-Wformat=] scanf("%d %d",&a,&b); ^ /in/foo.c:8:13: warning: format '%d' expects argument of type 'int *', but argument 3 has type 'long long int *' [-Wformat=] scanf("%d %d",&a,&b); ^ /in/foo.c:17:11: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=] printf("%d",sum); ^
代码
#include <stdio.h>
#include<math.h>
int main()
{
long long int a,b,x,sum=0;
int t;
scanf("%d %d",&a,&b);
x=pow(a,b);
while(x!=0)
{
t=x;
x=x/10;
t=t%10;
sum+=t;
}
printf("%d",sum);
}
信息
- 递交者
- 类型
- 递交
- 题目
- 观铃题
- 语言
- C
- 递交时间
- 2020-12-26 10:08:51
- 评测时间
- 2020-12-26 10:08:51
- 评测机
- 分数
- 0
- 总耗时
- 6ms
- 峰值内存
- 220.0 KiB