o(´^`)o773 2022-11-02 22:44 采纳率: 75%
浏览 25
已结题

为什么输出都对了,测试例子不过啊

img

#include<stdio.h>
int count(int x);
int main()
{
int N, i, n;
scanf("%d", &N);
if (N == 0) {
printf("0 ");
}
while (N != 0) {
n = count(N);
i = N / n;
N = N % n;
printf("%d ", i);
}

return 0;

}
int count(int x) {
int cnt = 1;
while (x > 9) {
x = x / 10;
cnt *= 10;
}
return cnt;
}

![img](https://img-mid.csdnimg.cn/release/static/image/mid/ask/9004

img

  • 写回答

1条回答 默认 最新

  • yun6853992 2022-11-02 22:48
    关注

    题目要求 长整型

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 系统已结题 11月11日
  • 已采纳回答 11月3日
  • 修改了问题 11月2日
  • 修改了问题 11月2日
  • 展开全部