# WA in CHANDF

**URL:** <https://discuss.codechef.com/t/wa-in-chandf/65782>\
**Category:** help\
**Created:** [May 14, 2020, 8:57am UTC](https://discuss.codechef.com/t/wa-in-chandf/65782 "2020-05-14T08:57:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![iamvedant\_vg](https://discuss.codechef.com/user_avatar/discuss.codechef.com/iamvedant_vg/32/24774_2.png) [@iamvedant\_vg](https://discuss.codechef.com/u/iamvedant_vg)\
**Post date:** [May 14, 2020, 8:57am UTC](https://discuss.codechef.com/t/wa-in-chandf/65782/1 "2020-05-14T08:57:06Z")

</div>

[https://www.codechef.com/viewsolution/33075263](https://www.codechef.com/viewsolution/33075263)

Can someone please help me out to find out the problem in this question of may long challenge 2020.  
I am unable to identify the missing edge case since many days

---

<div class="post-metadata">

**Author:** ![manjot1151](https://discuss.codechef.com/user_avatar/discuss.codechef.com/manjot1151/32/208155_2.png) [@manjot1151](https://discuss.codechef.com/u/manjot1151)\
**Post date:** [May 15, 2020, 7:00am UTC](https://discuss.codechef.com/t/wa-in-chandf/65782/2 "2020-05-15T07:00:23Z")

</div>

I could only find one mistake:

```auto
if(x==0 or y==0):
            print(0)

```

if x or y is equal to 0, you are printing 0. but what if `L>0`  
You need to print `L` instead in this case because 0 is not always within the range of L and R

---

<div class="post-metadata">

**Author:** ![iamvedant\_vg](https://discuss.codechef.com/user_avatar/discuss.codechef.com/iamvedant_vg/32/24774_2.png) [@iamvedant\_vg](https://discuss.codechef.com/u/iamvedant_vg)\
**Post date:** [May 15, 2020, 9:15am UTC](https://discuss.codechef.com/t/wa-in-chandf/65782/3 "2020-05-15T09:15:35Z")

</div>

Thank you very much.  
I totally missed out that thing,  
But still, there is something else also that I am missing, because still the verdict remains WA

---

<div class="post-metadata">

**Author:** ![manjot1151](https://discuss.codechef.com/user_avatar/discuss.codechef.com/manjot1151/32/208155_2.png) [@manjot1151](https://discuss.codechef.com/u/manjot1151)\
**Post date:** [May 15, 2020, 10:12am UTC](https://discuss.codechef.com/t/wa-in-chandf/65782/4 "2020-05-15T10:12:34Z")

</div>

I’m sorry but I myself was unable to solve subtask 2 and 3 of this question.  
You should take a look at the [EDITORIAL](https://discuss.codechef.com/t/chandf-editorial/)
