tahboubali's blog

By tahboubali, history, 5 weeks ago, In English

hi everyone i finally solved watermolen (python) i know i am smart hahah..

here is code:

#define
endl = "\n";
class Cout:
    def __lshift__(self, other):
        print(other, end="");
        return self;
    pass;

cout = Cout();

pass;

def solve(input):
    if ((input & 0) == 0):
        if (input == 2):
            return set([]);
        return "Yes";
    else:
        return 0;
    pass;


def main():
    i = int(input("Enter watermolen question (pls). ."));
    solved = bool(solve(i));
    cout << ("Yes" if solved else "No") << endl;
    return 0;
    pass;

if __name__ == "__main__":
    main();
    pass;

thank you for reading :)

hardest part was figuring out how to cout << .

i think i passed !

  • Vote: I like it
  • -20
  • Vote: I do not like it

»
5 weeks ago, # |
  Vote: I like it +16 Vote: I do not like it

wow thanks your solution completely blew my mind so much new interesting things to learn