Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This comment is hidden because it contains spoiler information about the solution
Yeah, I could but I didn't want to. My version is more readable.
This comment is hidden because it contains spoiler information about the solution
My first thought, but couldn't make these two play together in the end..
good job
"It's very smart" to use one of the slowest features of the c++ library
rejected by someone.
Rejected for using outdated language version.
Forking is still possible, so no work is necessarily lost.
best solution
After checking other issues, it appears that yes, unary minuses are tested in C++, so I think this issue is valid. These tests either have to be removed, or EBNF should be updated accordingly.
I'm genuenly confused why this comment would make people upset, but whatever.
ejini战神, I might be misremembering something, because I raised this issue 4 years ago, but iirc I raised this issue specifically because I got an unary minus in my tests and was kind of confused where it came from, because EBNF was not describing these cases at all, and eventually I got stuck with ignoring the EBNF provided by the description and reverse-engineering it from scratch based on test cases. That was the reason I called it "ambiguous and not quite correct". Just maybe, I don't remember my exact line of thoughts.
Also, I still find the fact that grammar accepts expressions without any numbers or variables as correct ones kind of... annoying, probably. Because even though they're never tested, it just looks bad. it's 2kyu kata after all, it has to be up to some standard.
Expressions that include unary minus like
1 * -(-1)
nor23 - (-15 + 7)
are not tested, so the EBNF grammar forfactor
andnumber
seem to be correct. But description still needs to explicity mention how to handle floating point divisions and the input range.People who are downvoting this comment are insulting themselves..
This is literally 3rd grade math..
Fixed.
Should be fixed.
Loading more items...