Suppose that I want to talk about my habit of studying to someone. <br/><br/>When I studied math, I used to drink a cup of coffee. I used to listen to some mucic, I used to eat some snacks.<br/><br/>When I studied math, I would drink a cup of coffee. I would listen to some music. I would eat some snacks. <br/><br/>Are these two sentences gramatically correct?