fork download
  1. n = 900
  2. c = n % 10
  3. n = (n - n % 10) // 10
  4. b = n % 10
  5. n = (n - n % 10) // 10
  6. a = n
  7. if a == b == c:
  8. print("3" + str(a))
  9. elif a == b and b != c:
  10. print("2" + str(a) + "1" + str(c))
  11. elif b == c and a != c:
  12. print("1" + str(a) + "2" + str(b))
  13. elif a != b != c:
  14. print("1" + str(a) + "1" + str(b) + "1" + str(c))
  15.  
  16.  
Success #stdin #stdout 0.02s 9256KB
stdin
Standard input is empty
stdout
1920