def divide(n, d): q = 0 r = n while r >= d: q += 1 d = d - r return q, r
Standard input is empty
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!