fork download
  1. def mayorD(N, M=0):
  2. if N == 0:
  3. return M
  4. if N % 10 > M:
  5. M = N % 10
  6. return mayorD(N // 10, M)
  7.  
  8. print(mayorD(91))
Success #stdin #stdout 0.03s 9576KB
stdin
Standard input is empty
stdout
9