Problem64 for up to 1000 (not 10k).