记录详情

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);
           ^
# 状态 耗时 内存占用
#1 Wrong Answer 0ms 212.0 KiB
#2 Wrong Answer 0ms 128.0 KiB
#3 Wrong Answer 0ms 212.0 KiB
#4 Wrong Answer 0ms 220.0 KiB
#5 Wrong Answer 0ms 212.0 KiB
#6 Wrong Answer 0ms 220.0 KiB
#7 Wrong Answer 0ms 212.0 KiB
#8 Wrong Answer 0ms 220.0 KiB
#9 Wrong Answer 0ms 212.0 KiB
#10 Wrong Answer 0ms 220.0 KiB

代码

#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