提交时间:2026-01-03 20:34:56
运行 ID: 79381
#include <bits/stdc++.h> using namespace std ; int a[10] ; void func(int n ) { int m = n ; while(m) { a[m % 10]++ ; m /= 10 ; } } int main() { int m , n ; cin >> m >> n ; for(int i = m ; i <= n ; i++ ) func(i) ; for(int i = 0 ; i < 10 ; i++ ) cout << a[i] << ' ' ; cout << endl ; return 0 ; }