結果
問題 |
No.1032 数数え
|
ユーザー |
![]() |
提出日時 | 2020-05-07 03:34:51 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 348 bytes |
コンパイル時間 | 1,555 ms |
コンパイル使用メモリ | 169,112 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-03 09:16:27 |
合計ジャッジ時間 | 2,840 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 5 WA * 5 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { int L, M; cin >> L >> M; vector<int> v(M + 1, 0); for (int i = 0; i < L; i++) { int n; cin >> n; int x = 1; while (x) { x = n % 10; if (x <= M) { v.at(x)++; } x /= 10; } } for (int i = 1; i < v.size(); i++) { cout << i << ' ' << v.at(i) << endl; } }