-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththird.go
542 lines (538 loc) · 5.57 KB
/
third.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
package main
import (
"strings"
"regexp"
"fmt"
)
func main() {
validCount := 0
passwords := strings.Split(inp, "\n")
for _, password := range passwords {
if isValidPassword(password) {
match, _ := regexp.MatchString("[0-9]", password)
if match {
fmt.Println(password)
validCount++
}
}
}
fmt.Println(validCount)
}
func isValidPassword(s string) bool {
if len(s) < 8 {
return false
}
match1, _ := regexp.MatchString(`[a-z]`, s)
if !match1 {
return false
}
match3, _ := regexp.MatchString(`[$#@]`, s)
if !match3 {
return false
}
match, _ := regexp.MatchString(`[A-Z]`, s)
if !match {
return false
}
return true
}
var inp = `Au@U9#
qVn@CCofgl
1FdwcP8V
OiBb@eP
#MdWf8
$@PdHJ
9mX4MQ
wiacShX
9kKGe$dk6f
s3$3BLlCaF
oRQf$5Uua
Ryd@3DHDqVhJ
eT$Yw@r8u
FL##o#VYbKA
@TwKvEM4Ug
kByuxWui
x@df8oMmF4x#
Lv@6Y$Lf$$Q
v#$874
XqtmX@
4hGpEWChlH
8hcctXA84@F
k0y7$Jq@lk$d
A$UggOD@pR
kIKZvPl
egTkaw3OS
r$6f#CPSv
ab@ratV29w@z
A9BJ#9ke
dHg#hDM
$pu$J38
7VWLtY0Q@c
3Az2M2
s#VC31pkA$
l#FSOa
r5@w$tB6ae
DS$XT#$h
G$mChJ@QHVg
37#zpmx@#vKQ
5Z38@ndg@tBf
tcE$Fqu
Kgd$9s1Hr7
2Bn@bt#H
6@e4$1p
$60r$A
@tURyu#1O702
YA1$voo#DA$t
SqFm1Bfd9
fkr@Jni@Y
Wi$hrKdTn
OsQKh#rMx@rl
vU5sEv
b@7LmP5
uvmhvXGg9r
CZBGgJ
@#0Tw7Jw
h0w@EXN3
@q9#$vmtg
pL#@@@zGLw@
##q6Z@8
yN$16XySgI
Zl6Q3$y
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