CodeForces 411A 手速题

//CodeForces 411A

 1 #include "iostream"
 2 #include "cstdio"
 3 #include "cstring"
 4 #include "algorithm"
 5 #include "vector"
 6 using namespace std;
 7 char str[110];
 8 bool isl(char c)
 9 {
10     if(c >= 'a' && c <= 'z')
11         return 1;
12     return 0;
13 }
14 
15 bool isL(char c)
16 {
17     if(c >= 'A' && c <= 'Z')
18         return 1;
19     return 0;
20 }
21 
22 bool isn(char c)
23 {
24     if(c >= '0' && c <= '9')
25         return 1;
26     return 0;
27 }
28 
29 int main()
30 {
31     int i, len;
32     scanf("%s", str + 1);
33     len = strlen(str + 1);
34     if(len < 5) {
35         printf("Too weak
");
36         return 0;
37     }
38     bool L, l, n;
39     L = l = n = 0;
40     for(i = 1; i <= len; ++i) {
41         if(isL(str[i]))
42             L = 1;
43         if(isl(str[i]))
44             l = 1;
45         if(isn(str[i]))
46             n = 1;
47     }
48     if(L && l && n)
49         printf("Correct
");
50     else
51         printf("Too weak
");
52 }
原文地址:https://www.cnblogs.com/AC-Phoenix/p/4298832.html