222 words
1 minutes
SCSC2026 Quals - Hitungan MTK - General Skills Writeup

Category: General Skills
Server: nc 43.128.69.211 10001
Flag: scsc26{p1nt3r_mtk_g4j4min_j4g0_scr1pt1ng_n_s0ck3t_pr0gr4mm1n6}

Challenge Description#

Connect to the server and solve 30 math problems within 1 second each.

Analysis#

Upon connecting, the server presents arithmetic problems that must be solved quickly. Manual solving is impossible due to the strict 1-second time limit per question.

$ nc 43.128.69.211 10001
Rockwell ada challenge berhitung UwU
Ada 30 soal hitungan, cuma boleh jawab 1x dalam waktu 1 detik!
====Rockwell====
52+55 = 

Key observations:

  • Multiplication uses x instead of *
  • Division uses : instead of /
  • Format is simple: <expr> = (no question mark, no problem number)
  • Must respond within 1 second or the question is skipped

Solution#

#!/usr/bin/env python3
from pwn import *
import re

def main():
    p = remote('43.128.69.211', 10001)
    
    # Wait for banner (ends with "====Rockwell====")
    p.recvuntil(b'====Rockwell====', timeout=5)
    
    for i in range(30):
        # Receive until " = " which marks end of expression
        line = p.recvuntil(b' = ', timeout=1).decode()
        
        # Parse expression: replace x->*, :->/, strip " = "
        expr = line.replace('x', '*').replace(':', '/').replace(' = ', '').strip()
        
        # Solve
        result = eval(expr)
        
        # Key insight: division needs 3 decimal places
        if '/' in expr:
            result = round(result, 3)
        else:
            result = int(result)
        
        print(f"[{i+1}] {expr} = {result}")
        p.sendline(str(result).encode())
    
    # Receive flag
    print(p.recvall(timeout=3).decode())

if __name__ == '__main__':
    main()

Key Insight#

Two critical discoveries:

  1. Operators are different: x for multiplication, : for division (Indonesian convention)
  2. Division results must be rounded to 3 decimal places using round(result, 3)
SCSC2026 Quals - Hitungan MTK - General Skills Writeup
https://blog.rei.my.id/posts/12/scsc2026-quals-hitungan-mtk-general-skills-writeup/
Author
Reidho Satria
Published at
2026-02-17
License
CC BY-NC-SA 4.0