fork download
  1. /*
  2. * @Author: hungeazy
  3. * @Date: 2026-03-04 23:24:15
  4. * @Last Modified by: hungeazy
  5. * @Last Modified time: 2026-04-04 15:45:26
  6. */
  7. #include <bits/stdc++.h>
  8. using namespace std;
  9. #define int long long
  10. #define MOD 1000000007
  11. string s;
  12. int cnt[256];
  13.  
  14. signed main()
  15. {
  16. ios_base::sync_with_stdio(false);
  17. cin.tie(NULL); cout.tie(NULL);
  18. cin >> s;
  19. int n = s.size();
  20. for (int i = 0; i < n; i++)
  21. cnt[s[i]]++;
  22. for (int i = 'a'; i <= 'z'; i++)
  23. cout << cnt[i] << " ";
  24. return 0;
  25. }
Success #stdin #stdout 0s 5312KB
stdin
Standard input is empty
stdout
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0