Various straightforward ways to type accented characters are outlined in the first set of course notes - see https://www.duolingo.com/skill/cy/Greetings-1/tips-and-notes
To find the course notes in general, go to https://forum.duolingo.com/topic/924/hot and see 'Course tips and notes'.
I'm assuming you're on a phone. If you install a Welsh spell checker you should have all the letters you need. You will need to press and hold the a to get the choice of accents.
As an emergency procedure you can copy the correct answer when they give it to you then paste it when the question comes round again.
But it does not normally get upset of you just get an accent wrong anyway. It is a bit erratic though.