Advertisement
dmemsm

Задача 1

Jan 24th, 2024
874
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. for i in range(100, 1000):
  2.     istr = str(i)
  3.     d1 = int(istr[0] + istr[1])
  4.     d2 = int(istr[1] + istr[0])
  5.     m = int(istr[0]) * int(istr[1]) * int(istr[2])
  6.     if m**2 == d1 or m**2 == d2:
  7.         print(istr)
  8.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement