To help with potential debugging problems, here is one example Part 1 run annotated with the account balance and interest balance at the end of each simulated day in a five week simulation.
~/$ ./part2
run 5 x500.txt
day 01: start-of-day balance = 700, end-of-day balance = 682.5
day 02: start-of-day balance = 682.5, end-of-day balance = 648.75
day 03: start-of-day balance = 648.75, end-of-day balance = 628
day 04: start-of-day balance = 628, end-of-day balance = 593
day 05: start-of-day balance = 593, end-of-day balance = 572.25
day 06: start-of-day balance = 572.25, end-of-day balance = 562.75
day 07: start-of-day balance = 562.75, end-of-day balance = 533.5
day 08: start-of-day balance = 533.5, end-of-day balance = 509.5
day 09: start-of-day balance = 509.5, end-of-day balance = 447
day 10: start-of-day balance = 447, end-of-day balance = 419.5
day 11: start-of-day balance = 419.5, end-of-day balance = 379
day 12: start-of-day balance = 379, end-of-day balance = 343.25
day 13: start-of-day balance = 343.25, end-of-day balance = 875.75
day 14: start-of-day balance = 875.75, end-of-day balance = 862.5
day 15: start-of-day balance = 862.5, end-of-day balance = 856.25
day 16: start-of-day balance = 856.25, end-of-day balance = 810
day 17: start-of-day balance = 810, end-of-day balance = 808.75
day 18: start-of-day balance = 808.75, end-of-day balance = 804.25
day 19: start-of-day balance = 804.25, end-of-day balance = 794.75
day 20: start-of-day balance = 794.75, end-of-day balance = 273.75
day 21: start-of-day balance = 273.75, end-of-day balance = 271.75
day 22: start-of-day balance = 271.75, end-of-day balance = 252
day 23: start-of-day balance = 252, end-of-day balance = 235.75
day 24: start-of-day balance = 235.75, end-of-day balance = 229.25
day 25: start-of-day balance = 229.25, end-of-day balance = 210.75
day 26: start-of-day balance = 210.75, end-of-day balance = 173.5
day 27: start-of-day balance = 173.5, end-of-day balance = 696
day 28: start-of-day balance = 696, end-of-day balance = 691
day 29: start-of-day balance = 691, end-of-day balance = 643
day 30: start-of-day balance = 643, end-of-day balance = 607
day 31: start-of-day balance = 607, end-of-day balance = 593.75
day 32: start-of-day balance = 593.75, end-of-day balance = 560.25
day 33: start-of-day balance = 560.25, end-of-day balance = 516
day 34: start-of-day balance = 516, end-of-day balance = 495
day 35: start-of-day balance = 495, end-of-day balance = 480.75
Ending balance = 480.75
Average end-of-day balance = 544.593