Heat the oven to 180C (160C fan)/gas 4. Grease a 20cm x 20cm baking tin with a little olive oil and line with parchment.
Put the diced apple and used coffee grounds in a small saucepan with water and salt, cook until the apple is soft, then blend to a puree.
Add the chocolate to the apple puree, stir until melted. Add sugar, flour, oil, and cocoa, mix thoroughly.
Pour the mixture into the greased tin and bake for 40-45 minutes at 180C (160C fan)/gas 4.
Let it cool, then slice and serve.