I've written short sections of code on a notebook before implementing it into a computer. It's slower, but it's possible, and I don't think paper is that inferior to a text editor. It will definitely require a lot more debugging when you finally implement it on a computer. So maybe write lots of test cases.