TCS codevita 2020 [ Counting Palindromes ]

Give me full code.

LOL , Ur code give 288 on test case 1 and u said it is correct .

now have a look bro

Can you please share your logic

My code also gave 288 and 432 as answers. Any info about this from tcs?

1 Like

n1,n2=[int(x) for x in input().split()]
a=1000000

c=0
while(a//1000000<=n2-n1+1):
a+=1
if(a%100>29):
a+=100
a-=30

    if((a//100)%100>59):
        a+=10000
        a-=6000
        if((a//10000)%100>23):
            a+=1000000
            a-=240000
s=str(a)
if (s[::-1]==s):
    c+=1
    print(s)

getting 288 leave the case for first nno as zero
how 432

They had wrong test cases for this problem even the sample outputs were wrong, 288 and 432 were correct answers. There’s something wrong from their side itself.

3 Likes

Read this Tough TCS Codevita: Zone 2 - #42 by mk1969 bro

1 Like

Have you mailed them regarding this?

the ques is wrong ,same case with me

So, the test cases are incorrect right?

According to me, test cases were wrong
some people were saying that their solution passes tcs for min and sec for loop till 97.
But i think on earth , time in min and sec can go upto 59.

Yes , I tried this question in 2 ways both have same answer and they failed on given test case itself .

Bro Test-Case is wrong
I also got this question and that too as my 1st question in TCS CodeVita :worried:
I wasted a lot of time in it.
TCS should take care of such things

They don’t , instead of clearifying , one user mailed them about this issue and they replied that question and sample test cases are correct many users solved this please check your code . :man_shrugging:

@goswamiji
Will You please share their mail id ?
I want to mail for wrong test cases.

@ashish_kaur please give their mail ID.

Yup Test cases were wrong.
Any idea when Results for Zone 2 will be out ?

The graph which was showing to me , In that no-one solved this question.
Only 62 something submissions are there for problem D - UnLocker

campuscommune@tcs.com