1 solutions

  • 0
    @ 2024-3-5 0:22:05

    #include <bits/stdc++.h>using namespace std;int a, b, cnt[10];void f_count(int num) { while (num > 0) { cnt[ num % 10 ] ++; num /= 10; }}int main() { cin >> a >> b; for (int i = a; i <= b; i ++) f_count(i); for (int i = 0; i < 10; i ++) { if (i) putchar(' '); cout << cnt[i]; } return 0;}

    • 1

    Information

    ID
    546
    Time
    1000ms
    Memory
    125MiB
    Difficulty
    1
    Tags
    # Submissions
    91
    Accepted
    39
    Uploaded By