A boolean value can be either True
or False
. Given a string with less than 1000 characters with a number of space-separated not
directives terminated by a True
or False
value, evaluate the boolean expression.
Sample Input 1
not not True
Sample Output 1
True
Sample Input 2
not not not False
Sample Output 2
True
Comments
I think the test case is too much.
I need a bit of help after I had 250 successful cases something went wrong and I can't figure out what.
Try some cases, for example:
Thank you!
why would anyone make 250 succesful tries anyway
This comment is hidden due to too much negative feedback. Show it anyway.
Congratulations on successfully convincing yourself that over 1000 people have solved this problem incorrectly.
Your program is what is incorrect, as you have not considered all cases. Specifically, there is a case where you output nothing.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
I know! They went a bit overboard with the test cases. Pretty sure it took 30 seconds.
"Can I copy your homework?"
"Sure just change it up a little"
didnt relize you got like 20 of the same XD
franxia is actually the teacher of all these students including me and when he taught us this case we copied his code and that's why its all the same
This comment is hidden due to too much negative feedback. Show it anyway.
Forget Bruce, Franxia all the way
Stated already... ↓
This comment is hidden due to too much negative feedback. Show it anyway.
Why are we booing him? The input is literally in python code format, which means that if you input into a python shell, it will actually run. That means that the problem is easily cheesed with python's eval that allows you to run python code in string form. Don't believe me? Look at all the top pypy3 submissions. It's literally one line of code.
What may be obvious to you may not be obvious to others, so please don't spell out the solution to problems in the comments.
it be like that sometimes
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
Yeah cus I math.random'd it and the dark lord didn't want me to ac
This comment is hidden due to too much negative feedback. Show it anyway.
Never thought I'd ever see a problem where the assembly solution is shorter than C++.
This comment is hidden due to too much negative feedback. Show it anyway.
The format the input is given in is not a coincidence.
This problem might be a bit easy in Python
This comment is hidden due to too much negative feedback. Show it anyway.
You can still do it in one line on Python 3 :)
Right. Python's an interpreted language. Gotta remember that.
On an unrelated note, I wonder if I can get AHK to solve equations by highlighting them using the same idea? Would save me so much time.
Not if you know the right shortcut ;)