> For the complete documentation index, see [llms.txt](https://j0luuuu.gitbook.io/ctf/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://j0luuuu.gitbook.io/ctf/snyk-ctf-2023/quick-maths.md).

# Quick Maths

## Challenge Description

> To try and get better grades in math, I made a program that gave me timed quizzes. Funny thing is that as I got better at the questions in this test, I got worse grades on my math tests.

> NOTE: Float answers are rounded to 1 decimal points.

> NOTE: And here's another twist... the answers to division questions depend on integer division or double division. I.e.,\
> 3/5 = 0\
> 3/5.0 = .6

## Solution

* On connecting to the instance, we are given some simple math questions
* We can write a script using `pwntools` to solve the question
* Using [script.py](https://github.com/HarshJolad/writeups-pvt/blob/master/Snyk%20CTF%202023/Quick%20Maths/script.py), we can get the flag

### FLAG

```
flag{77ba0346d9565e77344b9fe40ecf1369}
```
