Skip to content

Instantly share code, notes, and snippets.

View wanqizhu's full-sized avatar

Wanqi Zhu wanqizhu

View GitHub Profile

Keybase proof

I hereby claim:

  • I am wanqizhu on github.
  • I am iqiq (https://keybase.io/iqiq) on keybase.
  • I have a public key whose fingerprint is 190F AAEE 234E 6370 1647 5E0E 33A7 5CE6 5E9B 6B90

To claim this, I am signing this object:

Faster Math

If you connect to programming.easyctf.com:10300 enough times, you'll see the 4 types of problems:

  1. Fill in missing operations, which we can just brute force since there are only 27 possiblities;
  2. Find # of ways to get a certain value from a subset of the coins, which can be solved efficiently with Dynamic Programming
  3. Find distance traveled after being projected from a desk, a simple physics question
  4. Find greatest/least root, solve using quadratic formula

Obfuscated

The code looks scary, but in the end it just comes down to perseverance and carefully tracking your work. Try to figure out what each line does and look up unfamiliar functions. IDLE was very helpful to see what all the list indicing and map functions do. I've attached my understanding of the code, commented, below.

Once you figure out what each line does, the only catch is to keep track of the popped indices in relation with their original position in s. The flag just need to be any string passing the check, so any string of the form

Wh4/___/___0_0_0_0_M3//&&