daily pastebin goal
5%
SHARE
TWEET

Untitled

a guest Oct 12th, 2017 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. x = 2496387510
  2. y = str(x)
  3.  
  4. def urm_nr(nr_sir):
  5.     numar = list(nr_sir)
  6.     n = len(numar) - 1
  7.     while(numar[n-1] > numar[n]):
  8.         n = n - 1
  9.     temp = numar[n-1]
  10.     tempn = n-1
  11.     n = len(numar) - 1
  12.     while(temp > numar[n]):
  13.         n = n - 1
  14.     numar[tempn] = numar[n]
  15.     numar[n] = temp
  16.     return numar
  17.  
  18. print(urm_nr(y))
  19. print(list(y))
RAW Paste Data
Top