Please subscribe to the official Codeforces channel in Telegram via the link: ×

ymrg3307's blog

By ymrg3307, history, 9 months ago, In English,


submission of my solution

Why is my logic going wrong?

  • Vote: I like it  
  • -10
  • Vote: I do not like it  

9 months ago, # |
  Vote: I like it 0 Vote: I do not like it

You are interpreting numbers as string and then using Distinct(). Think of what happens when two digit numbers appear in input and Distinct which interprets them as character acts on them.