fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. string a;
  6. cin >> a;
  7. bool hoa = 0, thuong = 0, so = 0, khac = 0;
  8.  
  9. for (int i = 0; i < a.size(); i++) {
  10. char c = a[i];
  11. if (c >= 'A' && c <= 'Z') hoa = 1;
  12. else if (c >= 'a' && c <= 'z') thuong = 1;
  13. else if (c >= '0' && c <= '9') so = 1;
  14. else khac = 1;
  15. }
  16.  
  17. if (khac || a.size() < 6) cout << "Invalid";
  18. else if (hoa && thuong && so) cout << "Strong";
  19. else cout << "Weak";
  20.  
  21. return 0;
  22. }
  23.  
Success #stdin #stdout 0s 5320KB
stdin
Vinhniggersaygexhahaha8
stdout
Strong