title: Program To Check If A Given Number Is Lucky All Digits Are Different
signature: def program_to_check_if_a_given_number_is_lucky_all_digits_are_different(n):
source_py: def program_to_check_if_a_given_number_is_lucky_all_digits_are_different(n):
      ar = ([0] * 10)
      while (n > 0):
          digit = math.floor((n % 10))
          if ar[digit]:
              return 0
          ar[digit] = 1
          n = (n / 10)
      return 1
source_cpp: bool program_to_check_if_a_given_number_is_lucky_all_digits_are_different(int n) {
    bool arr [ 10 ];
    for ( int i = 0;
    i < 10;
    i ++ ) arr [ i ] = false;
    while ( n > 0 ) {
      int digit = n % 10;
      if ( arr [ digit ] ) return false;
      arr [ digit ] = true;
      n = n / 10;
    }
    return true;
  }
question_info.test_code: import array
  import bisect
  import collections
  import datetime
  import functools
  import heapq
  import itertools
  import math
  import queue
  import re
  import string
  import sys
  from typing import Any, Dict, List, Optional, Set
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  def validate_solution(actual, expected):
      return actual == expected
  
  def driver(n, expected):
      try:
          if validate_solution(PLACEHOLDER_FN_NAME(
              n),
              expected
          ):
              return "PASSED"
          return "FAILED"
      except Exception as exception_obj:
          return type(exception_obj).__name__
      
  if __name__ == "__main__":
      result = driver(474, 0)
      print(f"TEST-0...{result}")
  
      result = driver(9445, 0)
      print(f"TEST-1...{result}")
  
      result = driver(90, 0)
      print(f"TEST-2...{result}")
  
      result = driver(30, 0)
      print(f"TEST-3...{result}")
  
      result = driver(37453, 0)
      print(f"TEST-4...{result}")
  
      result = driver(27, 0)
      print(f"TEST-5...{result}")
  
      result = driver(2400, 0)
      print(f"TEST-6...{result}")
  
      result = driver(98, 0)
      print(f"TEST-7...{result}")
  
      result = driver(46, 0)
      print(f"TEST-8...{result}")
  
      result = driver(722, 0)
      print(f"TEST-9...{result}")
  
      sys.exit(0)
question_info.test_case_ids: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
question_info.entry_fn_name: program_to_check_if_a_given_number_is_lucky_all_digits_are_different
question_info.test_list: [{"idx": 0, "outputs": 0, "inputs": {"n": 474}}, {"idx": 1, "outputs": 0, "inputs": {"n": 9445}}, {"idx": 2, "outputs": 0, "inputs": {"n": 90}}, {"idx": 3, "outputs": 0, "inputs": {"n": 30}}, {"idx": 4, "outputs": 0, "inputs": {"n": 37453}}, {"idx": 5, "outputs": 0, "inputs": {"n": 27}}, {"idx": 6, "outputs": 0, "inputs": {"n": 2400}}, {"idx": 7, "outputs": 0, "inputs": {"n": 98}}, {"idx": 8, "outputs": 0, "inputs": {"n": 46}}, {"idx": 9, "outputs": 0, "inputs": {"n": 722}}]
question_info.entry_cls_name: Solution