0

Matching String D*oder

Could anybody help me correcting my code to hit the perfect score ?, it’s always wrong in the #1 TestCase jumlah = input() kata1 = input().lower().split() kata2 = input().lower().split() j = len(kata1) k = len(kata2) if j > 1 and j < 100: if kata1[1] in kata1[0]: print("Yes") else: print("No") if k > 1 and k < 100: if kata2[1] in kata2[0]: print("Yes") else: print("No")

21st Dec 2021, 8:46 PM
Bagus Tri Handoko
Bagus Tri Handoko - avatar
7 odpowiedzi
+ 2
Yeah man, what's it supposed to do? And don't they usually show the first couple? If so, what's the input?
21st Dec 2021, 9:36 PM
Slick
Slick - avatar
+ 1
okay, so whats the input for the one you have issues with? And what is the code supposed to do?
21st Dec 2021, 9:46 PM
Slick
Slick - avatar
+ 1
okay, no matter, whats the sample output?
21st Dec 2021, 9:57 PM
Slick
Slick - avatar
0
Yeah, they show the first couple. But I still didn’t know what’s wrong with my code. Really stuck man
21st Dec 2021, 9:43 PM
Bagus Tri Handoko
Bagus Tri Handoko - avatar
0
Is sample input counted as first TestCase in there? Sample Input: 2 abcde abc Pqrst pr
21st Dec 2021, 9:55 PM
Bagus Tri Handoko
Bagus Tri Handoko - avatar
0
Sample output: Yes No
21st Dec 2021, 9:58 PM
Bagus Tri Handoko
Bagus Tri Handoko - avatar
0
Alright, my bad, driving. So what does the Yes or No tell us?
21st Dec 2021, 10:39 PM
Slick
Slick - avatar