You are not logged in. Please login at to post your questions!


What is wrong in this code?

Question link:Buying Sweets

My code link:Answer

When i write the same logic with different implementation i get a AC. Can someone please help me out?

Accepted solution link:AC answer link

asked 22 Dec '18, 13:18

dilbwag1's gravatar image

accept rate: 0%

Oh man, Your whole code was right. You just forgot to add '=' in the condition in "any_of" statement, as the program should give -1 even when we have a note with value $sum$ % $x$.

Here is the solution. I just have added the '=' sign in it.


answered 22 Dec '18, 19:25

m_never_dies's gravatar image

accept rate: 0%

edited 22 Dec '18, 19:28

Oh!!..thank you for the help....:)

(22 Dec '18, 19:53) dilbwag13★
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:


question asked: 22 Dec '18, 13:18

question was seen: 82 times

last updated: 22 Dec '18, 19:53