10分,求助大佬

P1554 梦中的统计

### @[Haidde](/user/1215070) 用 `while` 判断数字 $ AC $ 代码: ```c #include <stdio.h> int a[11]; int main() { int l, r, j; scanf("%d%d", &l, &r); for (int i = l;i <= r;i++) { j = i; while (j > 0) { a[j % 10]++; j /= 10; } } for (int i = 0;i <= 9;i++) printf("%d ", a[i]); return 0; } ``` ### 祝你 $ AK $ $ IOI $
by cyx012113 @ 2024-02-07 09:46:50


@[Haidde](/user/1215070) 你好哇!循环里面你的你的i是从m加到n的,你弄反了!
by LSQS @ 2024-02-29 23:34:26


|