Problem 1 took me a LONG time because I was constantly stuck in infinite loop. After hours and days of thinking, my solution was to print every single numbers (when i run the program) so that I could see where the infinite loop was at. After finding that solution, it took me only a couple more hours to figure out.
Problem 2 took me about 3 hours. This part should've been easy, but I wasn't getting the right answer because I misunderstood the procedure. Just for other's sake I will tell you that the ratio between sum of logs of primes and log of 'n'th number
NOTE After going over others' assignment (to understand part2) I noticed that not everyone had the right answer. I advice others to check if these answers are right before actually using others' work as references