from pwn import *
cn = remote('192.168.3.11', 9999) # nc 192.168.3.11 9999
for i in range(20):
    print cn.recvuntil('Question>')
    prob = cn.recvline().replace('= ?', '')
    log.info('PROBLEM : ' + prob)
    ans = str(eval(prob))
    log.success('ANSWER : ' + ans)
    cn.sendline(ans)
    cn.recvline()
log.success(cn.recvline())

from pwn import *
cn = remote('192.168.3.11', 9999) # nc 192.168.3.11 9999
for i in range(20):
    print cn.recvuntil('Question>')
    prob = cn.recvline().replace('= ?', '')
    log.info('PROBLEM : ' + prob)
    ans = str(eval(prob))
    log.success('ANSWER : ' + ans)
    cn.sendline(ans)
    cn.recvline()
log.success(cn.recvline())

# nc 192.168.3.11 9999