aboutsummaryrefslogtreecommitdiff
path: root/challenge-009/lubos-kolouch/python/ch-1.py
blob: 2983cff8f6850558384a9c78c6fa0fcc0e6bf987 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import math

num = 1

while True:
    square = num * num
    digits = set(str(square))

    if len(digits) >= 5:
        print(f"The first square number with at least 5 distinct digits is: {square}")
        break

    num += 1