文章
2
粉丝
168
获赞
2
访问
14.3k
#include <stdio.h>
int bit(int a)
{
int i = 1;
while (a>9)
{
a = a / 10;
i = i * 10;
}
return i;
}
int reverse(int a,int b)
{
int count = 0;
if (a > 10)
{
count = reverse(a / 10, b / 10);
count = count + (a % 10) * b;
}
else
count = count + a * b;
return count;
}
int main()
{
int L, R;
int l = 1, r = 1;
int M, N;
int count = 0;
scanf("%d %d", &L, &R);
l = bit(L);
r = bit(R);
M = reverse(L, l);
N = reverse(R, r);
printf("%d\n", M + N);
return 0;
}
你的输出
444
正确输出
444
2
234
为啥捏???
登录后发布评论
应该是后边的样例答案不对,OJ有时候没把错误的样例显示出来