"The left leg does not hurt."
Sorry to vent, but I dislike trying to guess when they want kanji or hiragana... I wish they'd accept both. For me, it gets marked as wrong when I use kanji duo has taught me yet. Which I understand, but I can never remember if I've "learned" it in duo yet or if I only know it due to wanikani or other study haha.
Both would generally be correct. Although there are a few phrases that use "ga" more often, and I think "atama" is one of them. (Atama ga ii, atama ga itai, sei ga takai, sei ga hikui, as some examples). I'm not sure if there's a rule other than learning these set phrases.