Project Euler #32: Pandigital products

  • + 0 comments

    O(1) solution

    r = {4: 12,5: 52,6: 162,7:0,8:13458,9:45228} 
    print(r[int(input().strip())])