From 53eb0f769b632d4344e62b19d1e6a59b00a9583c Mon Sep 17 00:00:00 2001 From: Ren Baoshuo Date: Sun, 2 Aug 2020 15:10:47 +0800 Subject: [PATCH] =?UTF-8?q?P1554=20=E6=A2=A6=E4=B8=AD=E7=9A=84=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit R36226094 --- problem/P1554/P1554.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 problem/P1554/P1554.cpp diff --git a/problem/P1554/P1554.cpp b/problem/P1554/P1554.cpp new file mode 100644 index 00000000..b130b053 --- /dev/null +++ b/problem/P1554/P1554.cpp @@ -0,0 +1,20 @@ +// https://www.luogu.com.cn/record/36226094 + +#include + +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; +}