30 
 
        
      
      รับตัวเลขสุ่ม n ตัวเลขด้วยตัวเลขที่แตกต่างกันและไม่ใช่ 0
      
  ฉันอ่านคำถามนี้และคิดว่ามันจะเป็นการท้าทายที่ดี งาน ให้อินพุต0<n<10สร้างตัวเลขสุ่มด้วย ตัวเลขที่แน่นอน ครั้งแรกไม่ได้ 0 ดังนั้น f(n)>10**(n-1)-1 ตัวเลขที่แตกต่างกัน เกณฑ์การชนะ นี่คือรหัส - กอล์ฟเพื่อให้ได้รหัสที่สั้นที่สุด สุ่ม ฉันหมายถึงการกระจายแบบสุ่มอย่างสม่ำเสมอ ดังนั้นจากมุมมองของโปรแกรมแต่ละหมายเลขที่เป็นไปได้มีโอกาสเดียวกัน หากภาษาที่คุณกำลังเขียนมีตัวสร้างตัวเลขสุ่มแปลก ๆ ก็ไม่เป็นไรที่จะใช้มัน ตัวอย่าง รายการค่าที่จะเลือกแบบสุ่มสำหรับn=2คือ: [10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, …
      
        
          
                   22
                
        
        
          
                  
                    code-golf 
                  
                    number 
                  
                    random 
                  
                    grid 
                  
                    game 
                  
                    king-of-the-hill 
                  
                    javascript 
                  
                    code-golf 
                  
                    arithmetic 
                  
                    statistics 
                  
                    code-golf 
                  
                    math 
                  
                    code-golf 
                  
                    math 
                  
                    code-golf 
                  
                    string 
                  
                    palindrome 
                  
                    code-golf 
                  
                    string 
                  
                    interactive 
                  
                    code-golf 
                  
                    quine 
                  
                    polyglot 
                  
                    code-golf 
                  
                    string 
                  
                    stack-exchange-api 
                  
                    code-golf 
                  
                    number-theory 
                  
                    decision-problem 
                  
                    code-golf 
                  
                    tips 
                  
                    code-golf 
                  
                    string 
                  
                    internet 
                  
                    code-golf 
                  
                    graphical-output 
                  
                    image-processing 
                  
                    fractal 
                  
                    code-golf 
                  
                    ascii-art 
                  
                    geometry 
                  
                    hexagonal-grid 
                  
                    code-golf 
                  
                    string 
                  
                    restricted-source 
                  
                    hello-world 
                  
                    code-golf 
                  
                    game 
                  
                    code-golf 
                  
                    cipher 
                  
                    code-golf 
                  
                    permutations 
                  
                    cops-and-robbers 
                  
                    permutations 
                  
                    cops-and-robbers 
                  
                    code-golf 
                  
                    internet 
                  
                    stack-exchange-api 
                  
                    code-golf 
                  
                    ascii-art 
                  
                    random 
                  
                    code-golf 
                  
                    tips 
                  
                    code-golf 
                  
                    ascii-art 
                  
                    code-golf 
                  
                    code-golf 
                  
                    kolmogorov-complexity 
                  
                    code-golf 
                  
                    string 
                  
                    unicode 
                  
                    code-golf 
                  
                    number 
                  
                    sequence 
                  
                    primes 
                  
                    palindrome 
                  
                    code-golf 
                  
                    game 
                  
                    decision-problem 
                  
                    code-golf 
                  
                    math 
                  
                    geometry 
                  
                    code-golf 
                  
                    graphical-output 
                  
                    interactive 
                  
                    code-golf 
                  
                    set-partitions 
                  
                    code-golf 
                  
                    number 
                  
                    arithmetic 
                  
                    restricted-source 
                  
                    code-golf 
                  
                    decision-problem 
                  
                    python 
                  
                    recursion 
                  
                    code-golf 
                  
                    ascii-art 
                  
                    code-golf 
                  
                    source-layout 
                  
                    code-golf 
                  
                    function 
                  
                    recursion 
                  
                    functional-programming 
                  
                    code-golf 
                  
                    game 
                  
                    combinatorics 
                  
                    permutations 
                  
                    code-golf 
                  
                    string 
                  
                    file-system 
                  
                    code-golf 
                  
                    string 
                  
                    hashing 
                  
                    code-golf 
                  
                    stack-exchange-api 
                  
                    code-golf 
                  
                    string 
                  
                    code-golf 
                  
                    math 
                  
                    number 
                  
                    arithmetic 
                  
                    polyglot