Rating:

```
from pwn import *

p = remote('IP',PORT)

p.sendlineafter('> ','1')
p.recvlines(2)
rec = p.recvline().strip().split(b' ')
#Creazione dizionario per associare icone a numeri
#? -> 13 ? -> 55 ❌ -> 4 ? -> 62 ? -> 49 ⛔ -> 80 ? -> 35 ? -> 50 ? -> 56 ? -> 59
icoDict={rec[i]:rec[i+2] for i in range(0,len(rec)-2,3) }

p.sendlineafter('> ','2')
ncalc=1
while True:
p.recvlines(5)
if ncalc==501:
print(b'The flag is: ' + p.recv().split(b' ')[6].strip())
break
rec2= p.recvline().strip().split(b' ')
rec2=rec2[0:len(rec2)-3]

#sostituisco le icone con i numeri
for i in range(0,len(rec2),2):
rec2[i]=icoDict[rec2[i]]
#converto la lista in stringa
listToStr = ' '.join([str(elem) for elem in rec2])
print(str(ncalc) + ' -> ' + listToStr + ' = ' +str(eval(eval(listToStr))))
#invio il risultato
p.sendlineafter('Answer: ',str(eval(eval(listToStr))))
ncalc+=1
```