Code Coach Challenge : SoloLearn Gives Wrong Result On Submission | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

Code Coach Challenge : SoloLearn Gives Wrong Result On Submission

Here's the Code Coach Challenge (https://www.sololearn.com/coach/76?ref=app). It's a password validation challenge in Java. Here's my code (https://code.sololearn.com/cHUlSky8DC3K/?ref=app) In my Compiler(AIDE) the first check matches but it doesn't matches when I test it in sololearn. I mean when submit my code for challenge. The first match is something like (PassWord$#19). It should match as my code. In AIDE when I check with (PassWord$#19) it outputs "Strong" which it should but it outputs "Weak" in SoloLearn result. What I should I do now? Please, check out my code and tell me if there's any wrong.

13th Apr 2020, 7:07 PM
AA Shakil
AA Shakil - avatar
6 Respostas
+ 3
Hello AA Shakil input: 1@ab3cde& output: weak But it should be strong. 1. length() >= 7 not 14 (see description) 2. your patternmatcher Your matcher works only if the numbers or specials signs stand next to each other. 23 or &$
13th Apr 2020, 7:22 PM
Denise RoƟberg
Denise RoƟberg - avatar
+ 1
AA Shakil It seems to work now. Let me know if you passed all cases. :)
13th Apr 2020, 7:47 PM
Denise RoƟberg
Denise RoƟberg - avatar
+ 1
AA Shakil I checked this code: https://code.sololearn.com/cHUlSky8DC3K/?ref=app It passed all 13 test cases. I think your problem could be a time out because of sololearn's connection issues.
14th Apr 2020, 2:38 AM
Denise RoƟberg
Denise RoƟberg - avatar
+ 1
Denise RoƟberg I've figured out where the problem is. I'll have to get the input by Scanner instead of argv value. Taking the input by Scanner solved the problem. Thanks. šŸ˜ŠšŸ˜Š.
1st May 2020, 8:54 AM
AA Shakil
AA Shakil - avatar
0
Denise RoƟberg : Thanks for your reply. It was a problem and corrected it. Now, would you please recheck the code.
13th Apr 2020, 7:43 PM
AA Shakil
AA Shakil - avatar
0
Denise RoƟberg, Only 2,3,4, 6,7,8 matches. I don't know why but from the first time I've submitted till now I'm getting those 6 correct where I've changed my code many times.
13th Apr 2020, 7:53 PM
AA Shakil
AA Shakil - avatar