Advertisement
Korotkodul

tr10.n8

Jun 10th, 2023 (edited)
470
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.31 KB | None | 0 0
  1. v = 'POLYGN'
  2. k = 0
  3. for a1 in v:
  4.     for a2 in v:
  5.         for a3 in 'OY':
  6.             for a4 in v:
  7.                 for a5 in v:
  8.                     s = a1 + a2 + a3 + a4 + a5
  9.                     if s != s[::-1]:
  10.                         continue
  11.                     k += 1
  12.                     print(s)
  13. print(k)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement