mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-12-24 03:31:59 +00:00
P1554 梦中的统计
R36226094
This commit is contained in:
parent
45c391d79d
commit
53eb0f769b
20
problem/P1554/P1554.cpp
Normal file
20
problem/P1554/P1554.cpp
Normal file
@ -0,0 +1,20 @@
|
||||
// https://www.luogu.com.cn/record/36226094
|
||||
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int n, m, js[10];
|
||||
|
||||
int main() {
|
||||
cin >> n >> m;
|
||||
for(int i = n ; i <= m ; i++) {
|
||||
for(int j = i ; j ; j /= 10) {
|
||||
js[j%10]++;
|
||||
}
|
||||
}
|
||||
for(int i = 0 ; i < 10 ; i++) {
|
||||
cout << js[i] << " ";
|
||||
}
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user