## Boolean

View as PDF

Points:4
Time limit:2.0s
Memory limit:64M
Author:

Problem type

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


• println_hi_
commented on Oct. 20, 2016, 7:52 p.m.
Restriction?

You might want to ban the use of pythons exec and eval

• Xyene
commented on Oct. 20, 2016, 7:57 p.m.

The format the input is given in is not a coincidence.

• richardyi25
commented on March 5, 2016, 10:18 p.m.
Python

This problem might be a bit easy in Python

• Kirito
commented on March 5, 2016, 11:14 p.m.

Python 2, that is. Python 3 still requires work.

• richardyi25
commented on March 6, 2016, 11:30 a.m.

You can still do it in one line on Python 3 :)

• Kirito
commented on March 6, 2016, 2:15 p.m.

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.

commented on March 6, 2016, 11:13 a.m.

Not if you know the right shortcut ;)

• AltJlsajfj
commented on Oct. 7, 2015, 10:30 a.m.
heeeelp

how do you submit in java?

• Xyene
commented on Oct. 7, 2015, 12:15 p.m.

You open the language dropdown, and select "Java 7" or "Java 8" as the language.

• AltJlsajfj
commented on Oct. 7, 2015, 3:42 p.m.

Thanks, It just wasnt working earlier, now it works