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

View as PDF

Submit solution


Points: 1 (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 \le |s| \le 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, correseponding 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 L \le 37, you will receive the full 100 points.
  • if 38 \le L \le 42, you will receive 80-5 \times (L-38) points.
  • if 43 \le L, you will receive \lfloor 2^{0.21(70-L)} \rfloor points.

Sample Input 1

not not true

Sample Output 1

true

Sample Input 2

not not not false

Sample Output 2

true

Comments

There are no comments at the moment.