
January 25, 2003. The SQL Slammer worm fits inside a single 376 byte packet, needs no disk, and just sprays copies of itself as fast as the wire allows. It doubles the count of infected machines about every 8.5 seconds and saturates most of the vulnerable internet in around ten minutes, taking out ATMs, airline check-in, even a nuclear plant's monitoring network. Replay the spread: print the count as it doubles, until it hits the ceiling of hosts left to infect.
Objective
Print the infected host count doubling each interval, from 1, capped at 75000.
Steps
$ ./main 3
1 2 4 8
$ ./main 0
1
Expected files
Allowed functions
Loading solutions...