Lyndon's Golf Contest 1 P3 - Boolean (Buffed)

View as PDF

Submit solution


Points: 0 (partial)
Time limit: 2.0s
Memory limit: 256M

Author:
Problem type
Allowed languages
Python

One of DMOJ's oldest problems, Boolean, is coming back! Unfortunately, many users have been exploiting the problem by cheesing it with eval. This time, we've made sure not to let that happen.

Given a string s (1|s|1000) consisting of a non-negative number of space-separated not directives followed by a true or false, evaluate the boolean expression.

Note: You may only submit to this problem in Python 3.

Input Specification

The first line of input contains a string s.

Output Specification

Output on a single line, either true or false, corresponding to the result of the boolean expression.

Scoring

Your score will be computed based on the length of your source code, the shorter the better. For an L-byte program,

  • if L37, you will receive the full 100 points.
  • if 38L42, you will receive 805×(L38) points.
  • if 43L, you will receive 20.21(70L) points.

Sample Input 1

Copy
not not true

Sample Output 1

Copy
true

Sample Input 2

Copy
not not not false

Sample Output 2

Copy
true

Comments

There are no comments at the moment.