コード例 #1
0
 def test_gen_strobomatic(self):
     self.assertEqual(['88', '11', '96', '69'], gen_strobogrammatic(2))
コード例 #2
0
 def test_gen_strobomatic(self):
     self.assertEqual(["88", "11", "96", "69"], gen_strobogrammatic(2))
コード例 #3
0
ファイル: test_maths.py プロジェクト: Danawill/algorithms
 def test_gen_strobomatic(self):
     self.assertEqual(['88', '11', '96', '69'], gen_strobogrammatic(2))
コード例 #4
0
"""
A strobogrammatic number is a number that looks
the same when rotated 180 degrees (looked at upside down).
Find all strobogrammatic numbers that are of length = n.
For example,
Given n = 2, return ["11","69","88","96"].
"""
from algorithms.maths import gen_strobogrammatic

print(gen_strobogrammatic(2))