Щастливи числа

Краен срок
12.03.2014 17:00

Срокът за предаване на решения е отминал


Щастливо число е число, изведено по следния начин: започвайки от произволно положително число, замести числото със сумата от квадратите на всяка цифра в него, и продължи процеса, докато полученият резултат е равен на 1 (където ще се задържи), или безкрайно ще се върти в цикъл, който не съдържа 1. Числата, които стигат до 1 са щастливи, останалите - не.

Например, 19 е щастливо число, защото:

12 + 92 = 82

82 + 22 = 68

62 + 82 = 100

12 + 02 + 02 = 1

Условието

Напишете функция is_happy, която приема integer и връща булева стойност - True, ако е щастливо и False, ако не е.

Напишете още една функция happy_primes, която приема iterable от integers и връща списък от числата в дадения интервал, които са прости и щастливи.

Пример

In [1]: is_happy(7)
Out[1]: True

In [2]: is_happy(10)
Out[2]: True

In [3]: is_happy(11)
Out[3]: False

In [4]: is_happy(512)
Out[4]: False

In [5]: happy_primes(range(25))
Out[5]: [7, 13, 19, 23]

In [6]: happy_primes(range(63, 100))
Out[6]: [79, 97]

Решения

Никола Ненков
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Никола Ненков
def is_happy(number):
if number < 0:
return False
checked = set()
while True:
if number == 1:
return True
if number in checked:
return False
checked.add(number)
number = sum([int(digit)**2 for digit in str(number)])
def is_prime(number):
if number <= 1:
return False
for possible_divisor in range(2, number):
if number % possible_divisor == 0:
return False
return True
def happy_primes(numbers):
return [number for number in numbers if is_happy(number) and is_prime(number)]
...
----------------------------------------------------------------------
Ran 3 tests in 0.128s

OK
Атанас Филчев
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Атанас Филчев
def is_happy(number_to_check):
cached_numbers = set()
sum = get_sum_of_digits(number_to_check)
cached_numbers.add(sum)
while sum != 1:
sum = get_sum_of_digits(sum)
if sum in cached_numbers:
return False
cached_numbers.add(sum)
return True
def get_sum_of_digits(input_number):
split_numbers = [int(i) for i in str(input_number)]
sum = 0
for num in split_numbers:
sum += num**2
return sum
def happy_primes(interable_integers):
happy_simple_numbers = []
for i in interable_integers:
if is_happy(i) and is_prime(i):
happy_simple_numbers.append(i)
return happy_simple_numbers
def is_prime(number):
if number > 1:
for i in range(2, number):
if number % i == 0:
return False
return True
return False
...
----------------------------------------------------------------------
Ran 3 tests in 0.151s

OK
Йончо Йончев
  • Некоректно
  • 2 успешни тест(а)
  • 1 неуспешни тест(а)
Йончо Йончев
def is_happy(n):
past = set()
while n != 1:
n = sum(int(i)**2 for i in str(n))
if n in past:
return False
past.add(n)
return True
def happy_primes(xrange):
return [x for x in xrange if is_happy(x) and all(x%i!=0 for i in range(2,x))][0:]
.F.
======================================================================
FAIL: test_happy_primes_up_to_500 (test.TestHappyNumbers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "lib/language/python/runner.py", line 60, in thread
    raise it.exc_info[1]
  File "lib/language/python/runner.py", line 48, in run
    self.result = func(*args, **kwargs)
  File "/tmp/d20140312-30972-1noil7l/test.py", line 37, in test_happy_primes_up_to_500
    self.assertEqual(solution.happy_primes(range(0, 500)), happy_primes)
AssertionError: Lists differ: [1, 7, 13, 19, 23, 31, 79, 97,... != [7, 13, 19, 23, 31, 79, 97, 10...

First differing element 0:
1
7

First list contains 1 additional elements.
First extra element 23:
487

+ [7,
- [1,
-  7,
   13,
   19,
   23,
   31,
   79,
   97,
   103,
   109,
   139,
   167,
   193,
   239,
   263,
   293,
   313,
   331,
   367,
   379,
   383,
   397,
   409,
   487]

----------------------------------------------------------------------
Ran 3 tests in 0.187s

FAILED (failures=1)
Станислав Гатев
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Станислав Гатев
def sum_of_digits(number):
while True:
number = sum(map(lambda n: int(n) ** 2, str(number)))
yield number
def is_happy(number):
if number < 0:
return False
visited = set()
for number in sum_of_digits(number):
if number in visited:
return number == 1
visited.add(number)
def is_prime(number):
return number > 1 and all([number % n != 0 for n in range(2, number)])
def happy_primes(numbers):
return [n for n in numbers if is_prime(n) and is_happy(n)]
...
----------------------------------------------------------------------
Ran 3 tests in 0.141s

OK
Ралица Цанова
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Ралица Цанова
def is_happy(number):
results = []
while number > 1:
digits_square_sum = sum(map(lambda x: int(x) ** 2, str(number)))
if digits_square_sum in results:
return False
else:
results.append(digits_square_sum)
number = digits_square_sum
return number == 1
def is_prime(number):
for potential_divisor in range(2, number // 2 + 1):
if number % potential_divisor == 0:
return False
return number > 1
def happy_primes(numbers):
return list(filter(lambda x: is_happy(x) and is_prime(x), numbers))
...
----------------------------------------------------------------------
Ran 3 tests in 0.128s

OK
Снежана Спасова
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Снежана Спасова
def is_happy(number):
if number < 10:
return number == 1 or number == 7
else:
return is_happy(sum([x*x for x in number_to_list(number)]))
def number_to_list(number):
return list(map(int, list(str(number))))
def is_prime(number):
return len(list(filter(lambda x: number % x == 0, range(1, number)))) == 1
def happy_primes(numbers):
return [x for x in numbers if is_happy(x) and is_prime(x)]
...
----------------------------------------------------------------------
Ran 3 tests in 0.153s

OK
Марио Даскалов
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Марио Даскалов
def is_happy(number):
checked_numbers = set()
while number not in checked_numbers:
checked_numbers.add(number)
number = sum([int(digit) ** 2 for digit in str(number)])
if number == 1:
return True
return False
def is_prime(number):
for divisor in range(2, int(number ** 0.5) + 1):
if number % divisor == 0:
return False
return number > 1
def happy_primes(numbers):
return [n for n in numbers if is_prime(n) and is_happy(n)]
...
----------------------------------------------------------------------
Ran 3 tests in 0.091s

OK
Васил Тодоров
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Васил Тодоров
import math
def num_to_digits (number):
digits = []
while(number != 0):
digits.append(number % 10)
number = number // 10
return digits
reached_values = set()
def is_happy (number):
reached_values.clear()
if number == 0:
return False
return is_happy_helper(number)
def is_happy_helper (number):
if number in reached_values:
return False
reached_values.add(number)
sum_digits_squares = sum([x*x for x in num_to_digits(number)])
if sum_digits_squares == 1:
return True
else:
return is_happy_helper(sum_digits_squares)
def is_prime(number):
if(number <= 1): return False
for x in range(2, int(math.sqrt(number)) + 1):
if number > x and number % x == 0:
return False
return True
def happy_primes (numbers):
return [number for number in numbers if (is_prime(number) and is_happy(number))]
...
----------------------------------------------------------------------
Ran 3 tests in 0.070s

OK
Емануел Стоянов
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Емануел Стоянов
def is_happy(n):
return is_happy2(n, [])
def is_happy2(iter_n, sums):
digits = list(map(int, str(iter_n)))
sum_digits = sum([x*x for x in digits])
if sum_digits == 1:
return True
if sum_digits not in sums:
sums.append(sum_digits)
return is_happy2(sum_digits, sums)
else:
return False
def happy_primes(list):
happy_and_prime = []
for number in list:
if is_happy(number) and is_prime(number):
happy_and_prime.append(number)
return happy_and_prime
def is_prime(n):
return sum_of_divisors(abs(n)) == abs(n) + 1
def sum_of_divisors(n):
count = 0
for i in range(1, n+1):
if n % i == 0:
count += i
return count
...
----------------------------------------------------------------------
Ran 3 tests in 0.204s

OK
Стефани Цакова
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Стефани Цакова
def sum_of_digits(number):
sum = 0
for digit in number:
sum += int (digit) ** 2
return sum
def is_happy(number):
sums = []
while number > 1 and number not in sums:
sums.append(number)
number = sum_of_digits(str(number))
return number == 1
def prime(number):
if number == 1:
return False
else:
for divisor in range(2, int(number ** 0.5) + 1):
if number % divisor == 0:
return False
return True
def happy_primes(iterable):
result = []
for number in iterable:
if prime(number) and is_happy(number):
result.append(number)
return result
...
----------------------------------------------------------------------
Ran 3 tests in 0.084s

OK
Ирина Иванова
  • Некоректно
  • 1 успешни тест(а)
  • 2 неуспешни тест(а)
Ирина Иванова
def is_happy(number):
if number == 1:
return True
try:
digits_of_number = [int(x) for x in list(str(abs(number)))]
except RuntimeError:
return False
sum_of_square = sum([ x * x for x in digits_of_number])
return is_happy(sum_of_square)
def is_prime(number):
return abs(number) != 1 and not len([x for x in range(2, int(abs(number ** 0.5)) + 1) if number % x == 0])
def happy_primes(integers):
return [x for x in integers if is_happy(x) and is_prime(x)]
.EE
======================================================================
ERROR: test_happy_primes_up_to_500 (test.TestHappyNumbers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "lib/language/python/runner.py", line 57, in thread
    raise TimeoutError
TimeoutError

======================================================================
ERROR: test_no_unhappy__numbers_up_to_a_point (test.TestHappyNumbers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "lib/language/python/runner.py", line 57, in thread
    raise TimeoutError
TimeoutError

----------------------------------------------------------------------
Ran 3 tests in 4.072s

FAILED (errors=2)
Йордан Дикманов
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Йордан Дикманов
import math
def is_happyHelp(digit , previous):
if digit == 1: return True
if digit in previous: return False
previous.append(digit)
new_digit=0
for i in str(digit):
new_digit+=int(i)**2
return is_happyHelp(new_digit,previous)
def is_happy( digit ):
return digit>=0 and is_happyHelp(digit,[])
def is_prime(digit):
if digit == 1: return False
for i in range(2,math.floor(math.sqrt(digit)+1)):
if digit % i == 0:
return False
return True
def happy_primes(interval):
return [x for x in interval if is_prime(x) and is_happy(x)]
...
----------------------------------------------------------------------
Ran 3 tests in 0.098s

OK
Георги Янев
  • Некоректно
  • 2 успешни тест(а)
  • 1 неуспешни тест(а)
Георги Янев
def is_happy(number):
counter = 0
square_sum = sum(int(x)*int(x) for x in str(number))
while square_sum != 1 and counter < 100:
square_sum = sum(int(x)*int(x) for x in str(square_sum))
counter += 1
return(True if square_sum == 1 else False)
def is_prime(number):
half_number = int((number / 2) + 1)
possible_delimiters = list(range(1, half_number))
for i in possible_delimiters:
if number % i == 0 and i != 1:
return False
return True
def happy_primes(numbers):
happy_primes = []
for i in numbers:
if is_happy(i) and is_prime(i):
happy_primes.append(i)
return happy_primes
.F.
======================================================================
FAIL: test_happy_primes_up_to_500 (test.TestHappyNumbers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "lib/language/python/runner.py", line 60, in thread
    raise it.exc_info[1]
  File "lib/language/python/runner.py", line 48, in run
    self.result = func(*args, **kwargs)
  File "/tmp/d20140312-30972-1w2g05h/test.py", line 37, in test_happy_primes_up_to_500
    self.assertEqual(solution.happy_primes(range(0, 500)), happy_primes)
AssertionError: Lists differ: [1, 7, 13, 19, 23, 31, 79, 97,... != [7, 13, 19, 23, 31, 79, 97, 10...

First differing element 0:
1
7

First list contains 1 additional elements.
First extra element 23:
487

+ [7,
- [1,
-  7,
   13,
   19,
   23,
   31,
   79,
   97,
   103,
   109,
   139,
   167,
   193,
   239,
   263,
   293,
   313,
   331,
   367,
   379,
   383,
   397,
   409,
   487]

----------------------------------------------------------------------
Ran 3 tests in 1.708s

FAILED (failures=1)
Михаил Станин
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Михаил Станин
def is_happy(n):
answers = list()
while n>1 and n not in answers:
answers.append(n)
"""
n = sum(map(lambda x: int(x)**2, list(c for c in str(n))))
"""
n = sum([int(c)*int(c) for c in str(n)])
return n == 1
def is_prime(n):
if n<2: return False
if n==2: return True
for i in range(2,int(n**0.5)+1):
if n%i==0:
return False
return True
"""
def validate(item):
return (is_prime(item) and is_happy(item))
"""
def happy_primes(iters):
#return list(filter(validate,iters))
return [item for item in iters if is_prime(item) and is_happy(item)]
...
----------------------------------------------------------------------
Ran 3 tests in 0.107s

OK
Петър Камбуров
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Петър Камбуров
def is_happy(number):
sum_of_number = 0
set_of_sums = set()
while number not in set_of_sums and number != 1:
for num in str(number):
sum_of_number += int(num) ** 2
set_of_sums.add(number)
number = sum_of_number
sum_of_number = 0
return number == 1
def is_prime(number):
for num in range(2, int(number / 2) + 1):
if(number % num == 0):
return False
return number > 1
def happy_primes(iterable_of_integers):
happy_prime_numbers = []
for integer in iterable_of_integers:
if(is_happy(integer) and is_prime(integer)):
happy_prime_numbers.append(integer)
return happy_prime_numbers
...
----------------------------------------------------------------------
Ran 3 tests in 0.099s

OK
Йордан Петров
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Йордан Петров
def is_happy(input_number):
"""
Test if a given number is a happy number
Args:
input_number: the number to be tested
Returns: True if the given number is a happy number
"""
computed_numbers = set()
while True:
digits_squares_sum = sum_of_digits_squares(input_number)
if digits_squares_sum == 1:
return True
elif digits_squares_sum in computed_numbers:
return False
else:
computed_numbers.add(digits_squares_sum)
input_number = digits_squares_sum
def happy_primes(numbers_list):
"""
Returns a list from all the happy prime numbers in the given list
Args:
numbers_list: the input list of numbers
Returns: list of all the happy prime numbers contained in the input list
"""
return [happy_prime for happy_prime in numbers_list
if is_prime(happy_prime) and is_happy(happy_prime)]
def is_prime(number):
"""
Test is a given number is a prime number
Args:
number: number to be tested
Returns: True if the given number is a prime number
"""
if number == 1 or (number % 2 == 0 and number > 2):
return False
for divisor in range(3, number):
if number % divisor == 0:
return False
return True
def sum_of_digits_squares(number):
"""
Computes the sum of the squares of the digits of the given number
Args:
number: int number
Returns: sum of the squares of the digits of the input number
"""
digits_list = [int(digit) for digit in str(number)]
digits_squares_list = [s_digit**2 for s_digit in digits_list]
return sum(digits_squares_list)
...
----------------------------------------------------------------------
Ran 3 tests in 0.120s

OK
Филип Митов
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Филип Митов
def is_happy(number):
if number <= 0:
return False
new_number = sum([int(digit) ** 2 for digit in str(number)])
if new_number == 4:
return False
return is_happy(new_number) if not new_number == 1 else True
def is_number_prime(number):
divisor_range = range(2, int(number/2) + 1)
is_divisor = [number % divisor == 0 for divisor in divisor_range]
return False if number < 2 else not any(is_divisor)
def happy_primes(check_range):
return [number for number in check_range if is_happy(number) \
and is_number_prime(number)]
...
----------------------------------------------------------------------
Ran 3 tests in 0.087s

OK
Стефан Маринов
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Стефан Маринов
def is_happy_worker(number, seen_numbers):
if number == 1: return True
if number in seen_numbers: return False
seen_numbers.add(number)
child = 0
while number:
child += pow(number % 10, 2)
number //= 10
return is_happy_worker(child, seen_numbers)
def is_happy(number):
if number < 0: return False
return is_happy_worker(number, set())
# Sieve of Eratosthenes, used from my solution of the first challenge
def primes_until(number):
if number <= 1: return set()
sieve = list(range(3, number, 2))
for x in range(3, int(number ** 0.5) + 1, 2):
if sieve[(x - 3) >> 1]:
for tmp in range((x * x - 3) >> 1, (number >> 1) - 1, x):
sieve[tmp] = 0
return set([2] + [p for p in sieve if p > 0])
def happy_primes(iterable):
if not iterable: return []
primes = primes_until(max(iterable) + 1)
return [x for x in iterable if is_happy(x) and x in primes]
...
----------------------------------------------------------------------
Ran 3 tests in 0.068s

OK
Иван Бобев
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Иван Бобев
def get_digits(number):
while number > 0:
yield number % 10
number //= 10
def is_happy(number):
while number != 1 and number != 89:
number = sum(digit ** 2 for digit in get_digits(number))
return number == 1
def is_prime(number):
if number == 1: return False
if number == 2: return True
if number % 2 == 0: return False
return not any(number % divider == 0 \
for divider in range(3, int(number ** 0.5) + 1, 2))
def happy_primes(iterable):
return [number for number in iterable \
if is_prime(number) and is_happy(number)]
...
----------------------------------------------------------------------
Ran 3 tests in 0.040s

OK
Венцислав Велков
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Венцислав Велков
def is_happy(number):
sequence = set()
while True:
if number == 1:
return True
if number in sequence:
return False
sequence.add(number)
number = sum(int(d)**2 for d in str(number))
def is_prime(number):
if number < 2 or number % 2 == 0 and number != 2:
return False
for i in range(3, number, 2):
if number % i == 0:
return False
return True
def happy_primes(integers):
return [n for n in integers if is_prime(n) and is_happy(n)]
...
----------------------------------------------------------------------
Ran 3 tests in 0.100s

OK
Марио Димитров
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Марио Димитров
from functools import reduce
# Performs the iterations to find a happy number or identifies a loop
def is_happy(number):
iterated = set()
return is_happy_iter(number, iterated)
# Performs a single iteration to check whether a number is happy
def is_happy_iter(number, iterated):
if number == 1:
return True
num_string = str(number)
digits = []
for digit in num_string:
digits.append(int(digit))
digits.sort()
ordered_num = reduce(lambda x, y: 10*x+y, digits, 0)
if ordered_num in iterated:
return False
iterated.add(ordered_num)
digits_squared = map(lambda x: x**2, digits)
result = reduce(lambda x, y: x + y, digits_squared, 0)
return is_happy_iter(result, iterated)
def is_prime(number):
if number == 1:
return False
root = int(number**.5)
for div in range(2, root+1):
if number % div == 0:
return False
return True
def happy_primes(iterable):
result = []
for number in iterable:
if is_prime(number) and is_happy(number):
result.append(number)
return result
...
----------------------------------------------------------------------
Ran 3 tests in 0.179s

OK
Йосиф Цветков
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Йосиф Цветков
def is_happy(number):
if number <= 0:
return False
numbers = set()
while not number in numbers:
numbers.add(number)
num_to_str = str(number)
number = 0
for i in num_to_str:
number += int(i) ** 2
if number in numbers:
break
return number == 1
def is_prime(number):
if number <= 1:
return False
for i in range(2, int(number ** 0.5) + 1):
if number % i == 0:
return False
return True
def happy_primes(range_obj):
return [num for num in list(range_obj) if is_prime(num) and is_happy(num)]
...
----------------------------------------------------------------------
Ran 3 tests in 0.073s

OK
Драгомир Тунчев
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Драгомир Тунчев
def is_happy_helper(number, visited_numbers):
new_number = 0
while number:
new_number += (number % 10) ** 2
number = number // 10
if new_number == 1:
return True
elif visited_numbers and new_number in visited_numbers:
return False
else:
visited_numbers.append(new_number)
return is_happy_helper(new_number, visited_numbers)
def is_happy(number):
if number <= 0:
return False
return is_happy_helper(number, [])
def is_prime(number):
if number == 1:
return False
for divisor in range(2, number - 1):
if number % divisor == 0:
return False
return True
def happy_primes(numbers_list):
happy_primes_list = []
for number in numbers_list:
if is_happy(number) and is_prime(number):
happy_primes_list.append(number)
return happy_primes_list
...
----------------------------------------------------------------------
Ran 3 tests in 0.063s

OK
Атанас Димитров
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Атанас Димитров
def is_happy(number):
previous_values = []
while number not in previous_values and number != 1:
previous_values.append(number)
happy_value = 0
while number != 0:
happy_value = happy_value + (number % 10)**2
number = int(number / 10)
number = happy_value
return number == 1
def is_prime(number):
if number == 1:
return False
for i in range(2, number//2 + 1):
if number % i == 0:
return False
return True
def happy_primes(iterable):
return [item for item in iterable if is_happy(item) and is_prime(item)]
...
----------------------------------------------------------------------
Ran 3 tests in 0.101s

OK
Георги Стайков
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Георги Стайков
def length_of_integer(number):
return len(str(number))
def sum_of_digits(number):
result = 0
counter = length_of_integer(number)
while counter > 0:
result += (number % 10) ** 2
number = int(number / 10)
counter -= 1
return result
def is_happy(number):
if number < 0:
return False
list_of_checked_numbers = list()
return is_happy_helper(number, list_of_checked_numbers)
def is_happy_helper(number, list_of_checked_numbers):
if number in list_of_checked_numbers:
return False
if number == 1:
return True
list_of_checked_numbers.append(number)
number = int(sum_of_digits(number))
return is_happy_helper(number, list_of_checked_numbers)
def is_prime(number):
if number < 2:
return False
for it in range(2, number):
if number % it == 0:
return False
else:
return True
def happy_primes(range_):
result = list()
for number in range_:
if is_happy(number) and is_prime(number):
result.append(number)
return result
...
----------------------------------------------------------------------
Ran 3 tests in 0.269s

OK
Димитър Чаушев
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Димитър Чаушев
def get_next_number(input_number):
digits = list()
input_number = abs(int(input_number))
length = len(str(input_number))
while len(digits) != length:
digit = int(input_number) % 10
digits.append(digit)
input_number /= 10
new_num = 0
for num in digits:
new_num += (num*num)
return new_num
def is_happy(input_number):
set_of_numbers = set()
while (input_number > 1) and (input_number not in set_of_numbers):
set_of_numbers.add(input_number)
input_number = get_next_number(input_number)
return input_number == 1
def is_prime(input_number):
if input_number == 1:
return False
if_prime = True
for i in range(2, input_number):
if input_number % i == 0:
if_prime = False
break
return if_prime
def happy_primes(list_of_numbers):
happy_numbers = list()
for number in list_of_numbers:
if is_prime(number) and is_happy(number):
happy_numbers.append(number)
return happy_numbers
...
----------------------------------------------------------------------
Ran 3 tests in 0.124s

OK
Емилиан Станков
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Емилиан Станков
def is_happy(number):
been_here = set()
while True:
number = sum(int(digit) ** 2 for digit in str(number))
if number == 1:
return True
if number in been_here:
return False
been_here.add(number)
def happy_primes(iterable):
is_prime = False
happy_primes = []
for number in iterable:
if number == 1:
is_prime = False
if number == 2:
is_prime = True
for i in range(1, number + 1):
if i != 1 and i != number:
if number % i == 0:
is_prime = False
break
else:
is_prime = True
if is_prime and is_happy(number):
happy_primes.append(number)
return happy_primes
...
----------------------------------------------------------------------
Ran 3 tests in 0.119s

OK
Таня Христова
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Таня Христова
def get_digits(num):
digits = []
while num > 0:
digits.append(num%10)
num = num // 10
return digits
def is_happy(num):
sum_digits_sqrt = sum([x**2 for x in get_digits(num)])
already_cycled = [sum_digits_sqrt,]
while sum_digits_sqrt != 1:
sum_digits_sqrt = sum([x**2 for x in get_digits(sum_digits_sqrt)])
if sum_digits_sqrt in already_cycled:
return False
else:
already_cycled.append(sum_digits_sqrt)
return True
def is_prime(num):
if num <= 1:
return False
for x in range(2, num):
if num % x == 0:
return False
return True
def happy_primes(iterable):
happy_primes = [x for x in iterable if is_happy(x) and is_prime(x)]
return happy_primes
...
----------------------------------------------------------------------
Ran 3 tests in 0.108s

OK
Антонио Николов
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Антонио Николов
def is_happy(number):
if number < 0:
return False
used_numbers = []
while number != 1 and not number in used_numbers:
used_numbers.append(number)
number = sum([int(digit)**2 for digit in str(number)])
return number == 1
def happy_primes(orb):
return [number for number in orb if is_happy(number) and is_prime(number)]
def is_prime(number):
if number < 2:
return False
return all(number % divisor != 0 for divisor in range(2, number//2 + 1))
...
----------------------------------------------------------------------
Ran 3 tests in 0.127s

OK
Димитър Мутафчиев
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Димитър Мутафчиев
import math
def is_happy(n):
sequence = []
while n > 1 and n not in sequence:
sequence.append(n)
n = sum_of_squares(n)
return (n == 1)
def sum_of_squares(n):
return sum([int(i) * int(i) for i in str(n)])
def happy_primes(it):
return [i for i in it if is_happy(i) and is_prime(i)]
def is_prime(n):
return n != 1 and (([i for i in range(2, int(round(math.sqrt(n), 0)) + 1) if n % i == 0]) == [])
...
----------------------------------------------------------------------
Ran 3 tests in 0.133s

OK
Кирил Киров
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Кирил Киров
def is_happy(test_number):
loop = set()
while test_number > 1 and (test_number not in loop):
loop.add(test_number)
test_number = sqr_digits(test_number)
return test_number == 1
def sqr_digits(number):
number_digits = [int(single_digit) for single_digit in str(number)]
sqr_digits = [sin_num * sin_num for sin_num in number_digits]
sum_sqr_digit = 0
sum_sqr_digit = sum(sqr_digits)
return sum_sqr_digit
def happy_primes(iterable):
result_numbers = []
for num in iterable:
if is_happy(num) and prime(num):
result_numbers.append(num)
return result_numbers
def prime(number):
if number == 1:
return False
for iter in range(2, (number // 2) + 1):
if number % iter == 0:
return False
return True
...
----------------------------------------------------------------------
Ran 3 tests in 0.123s

OK
Ангел Новоселски
  • Некоректно
  • 0 успешни тест(а)
  • 3 неуспешни тест(а)
Ангел Новоселски
def sum(a):
b = 0
c = list(map(int,str(a)))
for i in c:
b+=i*i
return b
def is_happy(a):
seennumbers = set()
while a != 1:
if sumofdevisorssqrd(a) in seennumbers:
return False
a = sumofdevisorssqrd(a)
seennumbers.add(a)
return True
def prime(a):
for i in range(2,a):
if a%i==0:
return False
return True
def happy_primes(a):
result=[]
for i in a:
if is_happy(i) and prime(i):
result.append(i)
return result
EEE
======================================================================
ERROR: test_all_happy_numbers_up_to_a_point (test.TestHappyNumbers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "lib/language/python/runner.py", line 60, in thread
    raise it.exc_info[1]
  File "lib/language/python/runner.py", line 48, in run
    self.result = func(*args, **kwargs)
  File "/tmp/d20140312-30972-wq098i/test.py", line 24, in test_all_happy_numbers_up_to_a_point
    self.assertTrue(solution.is_happy(happy_number),
  File "/tmp/d20140312-30972-wq098i/solution.py", line 11, in is_happy
    if sumofdevisorssqrd(a) in seennumbers:
NameError: global name 'sumofdevisorssqrd' is not defined

======================================================================
ERROR: test_happy_primes_up_to_500 (test.TestHappyNumbers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "lib/language/python/runner.py", line 60, in thread
    raise it.exc_info[1]
  File "lib/language/python/runner.py", line 48, in run
    self.result = func(*args, **kwargs)
  File "/tmp/d20140312-30972-wq098i/test.py", line 37, in test_happy_primes_up_to_500
    self.assertEqual(solution.happy_primes(range(0, 500)), happy_primes)
  File "/tmp/d20140312-30972-wq098i/solution.py", line 26, in happy_primes
    if is_happy(i) and prime(i):
  File "/tmp/d20140312-30972-wq098i/solution.py", line 11, in is_happy
    if sumofdevisorssqrd(a) in seennumbers:
NameError: global name 'sumofdevisorssqrd' is not defined

======================================================================
ERROR: test_no_unhappy__numbers_up_to_a_point (test.TestHappyNumbers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "lib/language/python/runner.py", line 60, in thread
    raise it.exc_info[1]
  File "lib/language/python/runner.py", line 48, in run
    self.result = func(*args, **kwargs)
  File "/tmp/d20140312-30972-wq098i/test.py", line 30, in test_no_unhappy__numbers_up_to_a_point
    self.assertFalse(solution.is_happy(unhappy_number),
  File "/tmp/d20140312-30972-wq098i/solution.py", line 11, in is_happy
    if sumofdevisorssqrd(a) in seennumbers:
NameError: global name 'sumofdevisorssqrd' is not defined

----------------------------------------------------------------------
Ran 3 tests in 0.003s

FAILED (errors=3)
Божидар Карааргиров
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Божидар Карааргиров
not_happy_sequence = [ 0, 4, 16, 37, 58, 89, 145, 42, 20]
def is_happy(number):
if number in not_happy_sequence:
return False
digits = [int(x) for x in str(number)]
sum_of_squares = sum([x*x for x in digits])
if sum_of_squares == 1:
return True
else:
return is_happy(sum_of_squares)
def happy_primes(sequence):
sequence_of_happy_primes = []
for number in sequence:
if is_prime(number) and is_happy(number):
sequence_of_happy_primes.append(number)
return sequence_of_happy_primes
# Helper function for happy_prime
def is_prime(n):
'''
finds if a number is prime using the sieve of Eratosthenes
'''
if n == 0 or n == 1:
return False
if n < 0 :
n *= (-1)
sieve = [True] * (n + 1) # n+1 to make it more readable
(sieve[0],sieve[1]) = (False, False)
for i in range(2,n + 1):
if(sieve[i] == True):
remove = i + i
while(remove <= n):
sieve[remove] = False
remove += i
return sieve[n]
...
----------------------------------------------------------------------
Ran 3 tests in 0.129s

OK
Теодор Драганов
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Теодор Драганов
stop_values = [0, 1, 4]
def is_happy(number):
while number not in stop_values : number = sum([int(digit)**2 for digit in str(number)])
return number!=4 and number!=0
def is_prime(number):
for divisor in range(int(number/2)+1 , 2 ,-1):
if number % divisor == 0 :
return False
return number>1
def happy_primes(iterable_integers):
return [happy_prime for happy_prime in iterable_integers \
if is_prime(happy_prime) and is_happy(happy_prime)]
...
----------------------------------------------------------------------
Ran 3 tests in 0.069s

OK
Ангел Цанев
  • Некоректно
  • 2 успешни тест(а)
  • 1 неуспешни тест(а)
Ангел Цанев
def sum_of_squares_of_digits(number):
total = 0
while(number):
total += int(number%10) ** 2
number /= 10
return total
def is_happy(number):
visited = set()
while(number != 1):
if number in visited:
return False
visited.add(number)
number = sum_of_squares_of_digits(number)
return True
def is_prime(number):
if number < 2:
return False
return all( number % divisor != 0 for divisor in range(2, number))
def happy_primes(iterable):
return [number for number in iterable if is_prime(number) and is_happy(number)]
..E
======================================================================
ERROR: test_no_unhappy__numbers_up_to_a_point (test.TestHappyNumbers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "lib/language/python/runner.py", line 57, in thread
    raise TimeoutError
TimeoutError

----------------------------------------------------------------------
Ran 3 tests in 2.928s

FAILED (errors=1)
Антония Чекръкчиева
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Антония Чекръкчиева
def is_happy(number):
visited_numbers = []
while number != 1:
visited_numbers.append(number)
number = sum(int(digit) ** 2 for digit in str(number))
if number in visited_numbers:
return False
return True
def is_prime_number(number):
if number == 1:
return False
for i in range(2,number):
if (number % i) == 0:
return False
return True
def happy_primes(numbers):
list_with_number = []
for i in numbers:
if is_happy(i) and is_prime_number(i):
list_with_number.append(i)
return list_with_number
...
----------------------------------------------------------------------
Ran 3 tests in 0.125s

OK
Денис Бялев
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Денис Бялев
def digit_pow_sum(YourNumber):
return sum((map(lambda x: int(x) ** 2, str(YourNumber))))
def is_happy(happy_number):
if happy_number > 0:
is_happy_number=[]
while happy_number not in is_happy_number:
is_happy_number.append(happy_number)
happy_number=digit_pow_sum(happy_number)
if happy_number == 1:
return True
return False
def is_prime(number):
if number == 1:
return False
for x in range(2, number):
if number%x == 0:
return False
return True
def happy_primes(range_of_numbers):
list_of_happy_primes=[x for x in range_of_numbers if is_prime(x) and is_happy(x)]
return list_of_happy_primes
...
----------------------------------------------------------------------
Ran 3 tests in 0.101s

OK
Лъчезар Николов
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Лъчезар Николов
def is_happy(number):
if number < 0:
return False
visited = set()
while number != 1 and number not in visited:
visited.add(number)
number = sum([int(digit)**2 for digit in str(number)])
return number == 1
def happy_primes(iterable):
return [n for n in iterable if is_happy(n) and is_prime(n)]
def is_prime(n):
return n >= 2 and (not any(n % d == 0 for d in range(2, n)))
...
----------------------------------------------------------------------
Ran 3 tests in 0.134s

OK
Стоян Ефтимов
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Стоян Ефтимов
def is_happy(number):
checked_numbers = []
while number not in checked_numbers[:-1]:
new_number = 0
while number > 0:
digit = number % 10
new_number = new_number + digit**2
number = number // 10
if new_number == 1:
return True
checked_numbers.append(new_number)
number = new_number
return False
def happy_primes(numbers):
happy_prime_numbers = []
for number in numbers:
is_prime = True
divisor = 2
if number < 2:
is_prime = False
while is_prime and divisor <= number**0.5:
if not number % divisor:
is_prime = False
divisor = divisor + 1
if is_happy(number) and is_prime:
happy_prime_numbers.append(number)
return happy_prime_numbers
...
----------------------------------------------------------------------
Ran 3 tests in 0.074s

OK
Мартин Георгиев
  • Некоректно
  • 2 успешни тест(а)
  • 1 неуспешни тест(а)
Мартин Георгиев
def get_sum( n ):
if n == 0:
return 0
last_digit = n % 10
return last_digit * last_digit + get_sum( n // 10 )
def is_happy( n ):
l = [ n ]
s = get_sum( n )
while s not in l:
if s == 1:
return True
l.append( s )
s = get_sum( s )
return False
def is_prime( n ):
if n == 1:
return False
i = 2
while i <= n ** 0.5:
if n % i == 0:
return False
i += 1
return True
def happy_primes( rng ):
l = []
for el in rng:
if is_happy( el ) and is_prime( el ) :
l.append( el )
return l
F..
======================================================================
FAIL: test_all_happy_numbers_up_to_a_point (test.TestHappyNumbers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "lib/language/python/runner.py", line 60, in thread
    raise it.exc_info[1]
  File "lib/language/python/runner.py", line 48, in run
    self.result = func(*args, **kwargs)
  File "/tmp/d20140312-30972-168g0lg/test.py", line 26, in test_all_happy_numbers_up_to_a_point
    happy_number))
AssertionError: False is not true : 1 is expected to be a happy number

----------------------------------------------------------------------
Ran 3 tests in 0.058s

FAILED (failures=1)
Михаил Панайотов
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Михаил Панайотов
def is_happy(number):
result = 0
visited = set()
while result != 1:
digits = [int(digit) ** 2 for digit in str(number)]
number = sum(digits)
result = number
if number in visited:
return False
visited.add(number)
return result == 1
def is_prime(number):
if number == 1:
return False
for i in range(3, number):
if number % i == 0:
return False
return True
def happy_primes(numbers):
happy_and_prime = [number for number in numbers if is_happy(number) and is_prime(number)]
return happy_and_prime
...
----------------------------------------------------------------------
Ran 3 tests in 0.124s

OK
Даяна Маринова
  • Некоректно
  • 0 успешни тест(а)
  • 3 неуспешни тест(а)
Даяна Маринова
def is_happy(number):
list_of_sum = []
while True:
list_of_numbers = []
sum = 0
while number > 0:
if number < 10:
list_of_numbers.append(number)
else:
module = number % 10
list_of_numbers.append(module)
number /= 10
for num in list_of_numbers:
sum = sum + num ** 2
if len(list_of_sum) == 0:
list_of_sum.append(sum)
else:
if sum in list_of_sum:
return False
else:
list_of_sum.append(sum)
if sum == 1:
return True
else:
number = sum
def is_prime(n):
if n < 0:
n = abs(n)
if n == 1:
return False
if n == 2:
return True
for i in range(2, n):
if n % i == 0:
return False
return True
def happy_primes(iterable):
list_of_happy_prime_numbers = []
for num in iterable:
if is_prime(num) and is_happy(num):
list_of_happy_prime_numbers.append(num)
return list_of_happy_prime_numbers
EEE
======================================================================
ERROR: test_all_happy_numbers_up_to_a_point (test.TestHappyNumbers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "lib/language/python/runner.py", line 57, in thread
    raise TimeoutError
TimeoutError

======================================================================
ERROR: test_happy_primes_up_to_500 (test.TestHappyNumbers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "lib/language/python/runner.py", line 57, in thread
    raise TimeoutError
TimeoutError

======================================================================
ERROR: test_no_unhappy__numbers_up_to_a_point (test.TestHappyNumbers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "lib/language/python/runner.py", line 57, in thread
    raise TimeoutError
TimeoutError

----------------------------------------------------------------------
Ran 3 tests in 6.099s

FAILED (errors=3)
Милица Борисова
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Милица Борисова
import math
def digit_square(number):
digit_square_sum = 0
while number != 0:
digit_square_sum += pow (number%10, 2)
number = number // 10
return digit_square_sum
def is_happy(number):
number_sequence = []
while number not in number_sequence:
number_sequence.append(number)
number = digit_square(number)
if number == 1:
return True
return False
def is_prime(number):
sqrt_number = math.floor(math.sqrt(number))
for i in range(2, sqrt_number + 1):
if number % i == 0:
return False
return number > 1
def happy_primes(interval):
return [number for number in interval if is_happy(number)
and is_prime(number)]
...
----------------------------------------------------------------------
Ran 3 tests in 0.076s

OK
Цветелина Борисова
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Цветелина Борисова
def is_happy(number):
used_numbers = []
while number != 1:
number = sum([int(digit)**2 for digit in str(number)])
if number not in used_numbers:
used_numbers.append(number)
else:
return False
return True
def is_prime(number):
for divisor in range(2, int(number/2)):
if number % divisor == 0:
return False
return True and number != 1
def happy_primes(numbers):
return [number for number in numbers if is_happy(number) and is_prime(number)]
...
----------------------------------------------------------------------
Ran 3 tests in 0.123s

OK
Любомир Коев
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Любомир Коев
from math import sqrt
UNHAPPY_CYCLE = {4, 16, 37, 58, 89, 145, 42, 20}
def is_happy(number):
if number in UNHAPPY_CYCLE or number <= 0:
return False
while number != 1:
test = 0
for digit in list(str(number)):
test += int(digit) ** 2
if test in UNHAPPY_CYCLE:
return False
number = test
return True
def is_prime(number):
if number == 2:
return True
elif number < 2 or number % 2 == 0:
return False
top = sqrt(number)
for c in range(3, int(top+2), 2):
if number % c == 0:
return False
return number
def happy_primes(test_numbers):
return [num for num in test_numbers if is_prime(num) and is_happy(num)]
...
----------------------------------------------------------------------
Ran 3 tests in 0.037s

OK
Людмила Савова
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Людмила Савова
def next_number(number):
new_number=0
while number > 0:
digit = number%10
new_number = new_number + digit*digit
number = int(number/10)
return new_number
################################################################################
def is_happy(number):
while True:
if number == 1:
return True
if number == 4:
return False
number=next_number(number)
################################################################################
def happy_primes(test_range):
happy_prime_range=[]
for number in test_range:
if number != 0 and is_prime(number) == True and is_happy(number) == True:
happy_prime_range.append(number)
return happy_prime_range
################################################################################
def is_prime(number):
divider_count = 0
if number == 1:
return False
if number == 2:
return True
for i in range(2,number):
if number%i == 0:
return False
return True
...
----------------------------------------------------------------------
Ran 3 tests in 0.061s

OK
Евгени Евлогиев
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Евгени Евлогиев
import math
def prime(number):
for divisor in range(2, int(math.sqrt(number)) + 1):
if number % divisor == 0:
return False
return number != 1
def sum_of_squares(number):
sum = 0
while number:
sum += (number % 10) ** 2
number //= 10
return sum
def is_happy(number):
founded_numbers = []
current_number = sum_of_squares(number)
while current_number != 1:
if current_number in founded_numbers:
return False
else:
founded_numbers.append(current_number)
current_number = sum_of_squares(current_number)
return True
def happy_primes(interval):
result = []
for number in interval:
if is_happy(number) and prime(number):
result.append(number)
return result
...
----------------------------------------------------------------------
Ran 3 tests in 0.061s

OK
Елена Желева
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Елена Желева
def number_to_list(number):
lst = map(int, str(number))
return lst
def is_happy(number):
number = number_to_list(number)
sum_of_squares = 0
visited_squares = []
while sum_of_squares != 1:
sum_of_squares = 0
sum_of_squares = sum([x**2 for x in number])
number = number_to_list(sum_of_squares)
visited_squares.append(sum_of_squares)
for current in visited_squares:
if visited_squares.count(current) > 1:
return False
return True
def sum_of_divisors(n):
result = n
for i in range(1,n):
if n%i == 0:
result += i
return result
def is_prime(n):
return sum_of_divisors(n) == n + 1
def happy_primes(range_of_numbers):
result = []
for i in range_of_numbers:
if is_prime(i) and is_happy(i):
result.append(i)
return result
...
----------------------------------------------------------------------
Ran 3 tests in 0.185s

OK
Иван Георгиев
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Иван Георгиев
def sum_of_digits(number):
return sum([int(digit)**2 for digit in str(number)])
def is_happy(number):
checked = set()
while number > 1 and not number in checked:
checked.add(number)
number = sum_of_digits(number)
return number == 1
def is_prime(number):
if number in (0, 1):
return False
return not bool([unit for unit in range(2, number)
if not number % unit])
def happy_primes(numbers):
return [number for number in numbers
if is_prime(number) and is_happy(number)]
...
----------------------------------------------------------------------
Ran 3 tests in 0.134s

OK
Мария Кръстева
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Мария Кръстева
def squares_of_digits(n):
result = []
while n != 0:
result.insert(0, (n % 10)**2)
n = n//10
return result
def is_happy(n):
visited_numbers = []
total = sum(squares_of_digits(n))
while total != 1:
if total in visited_numbers:
break
else:
visited_numbers.append(total)
total = sum(squares_of_digits(total))
return total == 1
def sum_of_divisors(n):
result = n
for i in range(1, n):
if n % i == 0:
result = result + i
return result
def is_prime(n):
return sum_of_divisors(n) == n+1
def happy_primes(range):
result = []
for num in range:
if is_happy(num) and is_prime(num):
result.append(num)
return result
...
----------------------------------------------------------------------
Ran 3 tests in 0.110s

OK
Момчил Станчев
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Момчил Станчев
def is_prime(number):
if number > 2:
for divisor in range(2, int(number/2)+1):
if number % divisor == 0:
return False
return True
else:
return False
def is_happy(number):
sequence = []
if number > 0:
while 1 not in sequence:
number_as_string = str(number)
number = sum([int(digit)**2 for digit in number_as_string])
if number in sequence:
return False
else:
sequence.append(number)
return True
else:
return False
def happy_primes(iterable_object):
return [number for number in iterable_object if is_prime(number) and is_happy(number)]
...
----------------------------------------------------------------------
Ran 3 tests in 0.101s

OK
Георги Димитров
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Георги Димитров
def is_happy(number):
if number <= 0:
return False
passed = []
while number != 1 and number not in passed:
passed.append(number)
number = sum([int(c) ** 2 for c in str(number)])
return number == 1
def is_prime(number):
if number < 2: return False
return all(number % i for i in range(2, int(number ** 0.5) + 1))
def happy_primes(ints):
return [x for x in ints if is_happy(x) and is_prime(x)]
...
----------------------------------------------------------------------
Ran 3 tests in 0.123s

OK
Елена Димитрова
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Елена Димитрова
def sum_square_digits(n):
sum = 0
while n > 0:
digit = n % 10
sum += digit ** 2
n = n // 10
return sum
def is_happy(n):
already_checked = list()
buffer = n
sum_digits = sum_square_digits(buffer)
while sum_digits != 1 and not buffer in already_checked:
already_checked.append(buffer)
buffer = sum_digits
sum_digits = sum_square_digits(buffer)
if sum_digits == 1:
return True
else:
return False
def is_prime(n):
if n == 1:
return False
for i in range(2, n):
if n % i == 0:
return False
return True
def happy_primes(numbers):
happy_prime_numbers = list()
for number in numbers:
if is_happy(number) and is_prime(number):
happy_prime_numbers.append(number)
return happy_prime_numbers
...
----------------------------------------------------------------------
Ran 3 tests in 0.086s

OK
Теодор Халваджиев
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Теодор Халваджиев
def is_happy(number):
digits_for_number = number
all_versions = []
sum_of_digits = 0
while not number in all_versions:
while digits_for_number > 0:
sum_of_digits += (digits_for_number % 10) ** 2
digits_for_number = digits_for_number // 10
all_versions.append(number)
if sum_of_digits == 1:
return True
else:
number = sum_of_digits
digits_for_number = number
sum_of_digits = 0
return False
def is_prime(number):
if number <= 1:
return False
else:
for i in range(2, number):
if not number % i:
return False
return True
def happy_primes(number_sequence):
happy_prime_sequence = []
for number in number_sequence:
if is_prime(number) and is_happy(number):
happy_prime_sequence.append(number)
return happy_prime_sequence
...
----------------------------------------------------------------------
Ran 3 tests in 0.049s

OK
Гергана Петрова
  • Некоректно
  • 2 успешни тест(а)
  • 1 неуспешни тест(а)
Гергана Петрова
from functools import reduce
def square_sum(number):
return sum(int(i)**2 for i in str(number))
HAPPY_SEQUENCE = set()
def is_happy(number):
square = square_sum(number)
if square == 1:
HAPPY_SEQUENCE.clear()
return True
elif square in HAPPY_SEQUENCE:
HAPPY_SEQUENCE.clear()
return False
else:
HAPPY_SEQUENCE.add(square)
return is_happy(square)
def is_prime(number):
n = abs(number)
return reduce((lambda x,y: x*y), range(1, n)) % n == n - 1
def happy_primes(interval):
return [x for x in interval if is_happy(x) and is_prime(x)]
.E.
======================================================================
ERROR: test_happy_primes_up_to_500 (test.TestHappyNumbers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "lib/language/python/runner.py", line 60, in thread
    raise it.exc_info[1]
  File "lib/language/python/runner.py", line 48, in run
    self.result = func(*args, **kwargs)
  File "/tmp/d20140312-30972-ezt9pj/test.py", line 37, in test_happy_primes_up_to_500
    self.assertEqual(solution.happy_primes(range(0, 500)), happy_primes)
  File "/tmp/d20140312-30972-ezt9pj/solution.py", line 25, in happy_primes
    return [x for x in interval if is_happy(x) and is_prime(x)]
  File "/tmp/d20140312-30972-ezt9pj/solution.py", line 25, in <listcomp>
    return [x for x in interval if is_happy(x) and is_prime(x)]
  File "/tmp/d20140312-30972-ezt9pj/solution.py", line 22, in is_prime
    return reduce((lambda x,y: x*y), range(1, n)) % n == n - 1
TypeError: reduce() of empty sequence with no initial value

----------------------------------------------------------------------
Ran 3 tests in 0.096s

FAILED (errors=1)
Иван Иванов
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Иван Иванов
def square_sum_digits (number):
square_sum_of_digits = 0
while number:
square_sum_of_digits += (number % 10) * (number % 10)
number = (int)(number / 10)
return square_sum_of_digits
def is_happy(number):
set_of_squares = set()
while number != 1 and not (square_sum_digits(number) in set_of_squares):
set_of_squares.add(number)
number = square_sum_digits(number)
return number == 1
def is_prime(number):
divisor_counter = 0
for divisor in range(1, number+1):
if number % divisor == 0:
divisor_counter += 1
return divisor_counter == 2
def happy_primes(interable_numbers):
happy_prime_numbers = []
for number in interable_numbers:
if is_prime(number) and is_happy(number):
happy_prime_numbers.append(number)
return happy_prime_numbers
...
----------------------------------------------------------------------
Ran 3 tests in 0.124s

OK
Ивайло Бъчваров
  • Некоректно
  • 2 успешни тест(а)
  • 1 неуспешни тест(а)
Ивайло Бъчваров
def is_happy(number, checked_numbers=None):
if checked_numbers is None:
checked_numbers = []
digits = map(int, str(number))
sum = 0
for digit in digits:
sum += digit ** 2
if sum == 1:
return True
elif sum in checked_numbers:
return False
else:
checked_numbers.append(sum)
return is_happy(sum, checked_numbers)
def is_prime(number):
for j in range(2, number):
if number % j == 0:
return False
return True
def happy_primes(numbers):
prime_and_happy = []
for number in numbers:
if is_happy(number) and is_prime(number):
prime_and_happy.append(number)
return prime_and_happy
.F.
======================================================================
FAIL: test_happy_primes_up_to_500 (test.TestHappyNumbers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "lib/language/python/runner.py", line 60, in thread
    raise it.exc_info[1]
  File "lib/language/python/runner.py", line 48, in run
    self.result = func(*args, **kwargs)
  File "/tmp/d20140312-30972-1jve4em/test.py", line 37, in test_happy_primes_up_to_500
    self.assertEqual(solution.happy_primes(range(0, 500)), happy_primes)
AssertionError: Lists differ: [1, 7, 13, 19, 23, 31, 79, 97,... != [7, 13, 19, 23, 31, 79, 97, 10...

First differing element 0:
1
7

First list contains 1 additional elements.
First extra element 23:
487

+ [7,
- [1,
-  7,
   13,
   19,
   23,
   31,
   79,
   97,
   103,
   109,
   139,
   167,
   193,
   239,
   263,
   293,
   313,
   331,
   367,
   379,
   383,
   397,
   409,
   487]

----------------------------------------------------------------------
Ran 3 tests in 0.116s

FAILED (failures=1)
Мария Кърчева
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Мария Кърчева
def make_list(num):
digits = []
while num > 0:
digits.append(num % 10)
num //= 10
return digits
def sum_square(digits):
sum = 0
for digit in digits:
if(len(digits) == 1 and digits[0] != 7):
sum = digits[0]
else:
sum += digit ** 2
return sum
def is_happy(num):
digits = make_list(num)
sums = []
total = sum_square(digits)
while (not total in sums) and (total != 1):
sums.append(total)
total = sum_square(make_list(total))
if total == 1:
return True
else:
return False
def is_happy_recursion(num):
digits = make_list(num)
if sum_square(digits) == 1:
return True
elif sum_square(digits) < 10 and sum_square(digits) !=7:
return False
else:
return is_happy_recursion(sum_square(digits))
def is_simple(num):
if num == 0 or num == 1:
return False
elif num == 2:
return True
elif num % 2 == 0:
return False
else:
simple_num = True
i = 3
while simple_num and i < num // 2:
if num % i != 0:
i += 2
else:
simple_num = False
return simple_num
def happy_primes(iterable):
return [num for num in iterable if (is_happy(num) and is_simple(num))]
...
----------------------------------------------------------------------
Ran 3 tests in 0.073s

OK
Стоян Цветков
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Стоян Цветков
def is_happy(num):
if num <= 0:
return False
cycle_numbers = [4, 16, 37, 58, 89, 145, 42, 20]
copy = num
while True:
digits = [int(digit) for digit in str(copy)]
squares = [a_digit**2 for a_digit in digits]
sum_of_squares = sum(squares)
if sum_of_squares == 1:
break
elif sum_of_squares in cycle_numbers:
return False
else:
copy = sum_of_squares
return True
def happy_primes(numbers):
factors = lambda x: len([div for div in range(1, x + 1) if x % div == 0])
return [num for num in numbers if is_happy(num) and factors(num) == 2]
...
----------------------------------------------------------------------
Ran 3 tests in 0.068s

OK
Герасим Станчев
  • Некоректно
  • 2 успешни тест(а)
  • 1 неуспешни тест(а)
Герасим Станчев
def split_to_list(number):
digits = []
for i in range(len(str(number))):
digits.append("{}".format(number)[i])
return digits
def check_if_happy(number):
digits = split_to_list(number)
sum = 0
for i in range(len(digits)):
sum += int(digits[i]) ** 2
if sum == 1:
return True
else:
return sum
def is_happy(number):
const_loops = 1000 #A thousand loops is a cycle for me ;) It's debatable, though...
temp_check_happy = check_if_happy(number)
for i in range(const_loops):
if temp_check_happy == True:
return True
temp_check_happy = check_if_happy(temp_check_happy)
return False
def is_prime(number):
if number == 4 or number == 1:
return False
for i in range(2, int(number / 2)):
if number % i == 0:
return False
return True
def happy_primes(iteratable):
result = []
for i in iteratable:
if is_prime(i) and is_happy(i):
result.append(i)
return result
..E
======================================================================
ERROR: test_no_unhappy__numbers_up_to_a_point (test.TestHappyNumbers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "lib/language/python/runner.py", line 57, in thread
    raise TimeoutError
TimeoutError

----------------------------------------------------------------------
Ran 3 tests in 2.988s

FAILED (errors=1)
Никола Димитров
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Никола Димитров
import math
HAPPY_NUMBERS_UNDER_100 = { 1, 7, 10, 13, 19, 23, 28, 31, 32, 44, 49, 68, 70, 79, 82, 86, 91, 94, 97 }
def sum_digit_squares(n):
return sum([int(digit) ** 2 for digit in str(n)])
def is_happy(n):
if n < 100:
return n in HAPPY_NUMBERS_UNDER_100
return is_happy(sum_digit_squares(n))
def is_prime(n):
largest_possible_divisor = math.floor(math.sqrt(n)) + 1
return n > 1 and not [k for k in range(2, largest_possible_divisor) if n % k == 0]
def happy_primes(iterable):
return [number for number in iterable if is_prime(number) and is_happy(number)]
...
----------------------------------------------------------------------
Ran 3 tests in 0.021s

OK
Димитър Желев
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Димитър Желев
def is_happy(number):
"""determines if number is a happy number"""
if number <= 0:
return False
visited = [number]
current = 0
while current not in visited:
visited.append(current)
current = 0
while number != 0:
current += (number % 10)**2
number = int(number / 10)
if current == 1:
return True
number = current
return False
def is_prime(number):
"""determines if number is a prime number"""
potential_prime = 2
prime_set = [potential_prime]
potential_prime += 1
prime_set.append(potential_prime)
while potential_prime < number:
potential_prime += 2
test = True
sqrt_potential_prime = potential_prime**0.5
for a in prime_set:
if a > sqrt_potential_prime:
break
if potential_prime % a == 0:
test = False
break
if test:
prime_set.append(potential_prime)
if number == potential_prime:
return True
return number in prime_set
def happy_primes(numbers):
"""returns prime and happy integers from numbers"""
return [x for x in numbers if is_prime(x) and is_happy(x)]
...
----------------------------------------------------------------------
Ran 3 tests in 0.295s

OK
Веселин Генадиев
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Веселин Генадиев
def is_happy(number, past = None):
past = past if past else set()
if number in past: return number == 1
past.add(number)
next = sum(int(digit) ** 2 for digit in str(number))
return is_happy(next, past)
def is_prime(number):
divisors_sum = sum(divisor for divisor in range(2, number)
if number % divisor == 0)
return number > 1 and divisors_sum == 0
def happy_primes(numbers):
return [number for number in numbers
if is_happy(number) and is_prime(number)]
...
----------------------------------------------------------------------
Ran 3 tests in 0.139s

OK
Николай Масларски
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Николай Масларски
def is_happy(number):
if number == 4 or number <= 0:
return False
if number == 1:
return True
number_digits = [int(i) for i in str(number)]
new_number = 0
for i in number_digits:
new_number += i ** 2
return is_happy(new_number)
def is_prime(number):
if number == 1:
return False
for i in range(2, number):
if number % i == 0:
return False
return True
def happy_primes(iterables):
result = []
for number in iterables:
if is_prime(number) and is_happy(number):
result.append(number)
return result
...
----------------------------------------------------------------------
Ran 3 tests in 0.074s

OK
Теодора Добрева
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Теодора Добрева
def is_happy(number):
generated_numbers = set()
while number != 1:
number = sum(int(digit) * int(digit) for digit in str(number))
if number in generated_numbers:
return False
generated_numbers.add(number)
return True
def is_prime(number):
if number < 2:
return False
divisor = 2
while divisor <= number / 2:
if number % divisor == 0:
return False
divisor += 1
return True
def happy_primes(integers):
happy_prime_integers = []
for number in integers:
if is_prime(number) and is_happy(number):
happy_prime_integers.append(number)
return happy_prime_integers
...
----------------------------------------------------------------------
Ran 3 tests in 0.110s

OK
Александър Златков
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Александър Златков
happy_numbers_cache = {}
def square_digits_sum(x):
if x == 0:
return 0
current_digit = x%10;
return (current_digit**2)+square_digits_sum(x//10)
def is_happy(x):
if x < 1:
return False
if x == 1:
return True
if x in happy_numbers_cache:
return happy_numbers_cache[x]
happy_numbers_cache[x] = False
digits_sum_squared = square_digits_sum(x)
result = is_happy(digits_sum_squared)
happy_numbers_cache[x] = result
return result
def is_prime(x):
for divisor in range(2, x - 1):
if x % divisor == 0:
return False
return x != 1;
def happy_primes(numbers):
result = []
for number in numbers:
if is_prime(number) and is_happy(number):
result.append(number)
return result
...
----------------------------------------------------------------------
Ran 3 tests in 0.018s

OK
Моника Димитрова
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Моника Димитрова
import math
def is_happy(number):
checked = set()
while number != 1:
number = sum(int(i)**2 for i in str(abs(number)))
if number in checked:
return False
checked.add(number)
return True
def abs(number):
return int(math.fabs(number))
def is_prime(number):
if abs(number) == 1: return False
for i in range(2, int(math.sqrt(abs(number))+1)):
if number % i == 0:
return False
return True
def happy_primes(iterable):
return list(filter(is_prime, filter(is_happy, iterable)))
...
----------------------------------------------------------------------
Ran 3 tests in 0.281s

OK
Христо Петков
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Христо Петков
def is_happy (happy_number, checked_numbers=None):
new_number = 0
if checked_numbers is None:
checked_numbers = []
for i in str(happy_number):
new_number += int(i) * int(i)
if new_number == 1:
return True
if new_number in checked_numbers:
return False
checked_numbers.append(new_number)
return is_happy(new_number, checked_numbers)
def is_prime(a):
if a == 1:
return False
return all(a % i for i in range(2, a))
def happy_primes(happy_range):
happy_list = []
for i in happy_range:
if is_happy(i) and is_prime(i):
happy_list.append(i)
return happy_list
...
----------------------------------------------------------------------
Ran 3 tests in 0.143s

OK
Данаил Койчев
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Данаил Койчев
def sum_digits_squared(number):
sum = 0
while number != 0:
sum += (number % 10) ** 2
number //= 10
return sum
def is_happy(number):
if number <= 0:
return False
results = []
while number != 1:
number = sum_digits_squared(number)
if (number in results):
return False
else:
results.append(number)
return True
def is_prime(number):
if number < 2:
return False
for potential_divisor in range(2, int(number ** 0.5 + 1)):
if number % potential_divisor == 0:
return False
return True
def happy_primes(iterableInts):
return [num for num in iterableInts if is_prime(num) and is_happy(num)]
...
----------------------------------------------------------------------
Ran 3 tests in 0.051s

OK
Елица Илиева
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Елица Илиева
def get_digits(num):
digits = []
while num >= 1:
current_digit = num % 10
digits.append(current_digit)
num = num // 10
return digits
def is_happy(num):
sum_of_digits = sum(map(lambda x: x**2, get_digits(num)))
checked = []
while sum_of_digits != 1:
checked.append(sum_of_digits)
sum_of_digits = sum(map(lambda x: x**2, get_digits(sum_of_digits)))
if sum_of_digits in checked:
return False
return True
def is_prime(num):
if num < 2:
return False
if num == 2:
return True
elif num % 2 == 0:
return False
sqrt_of_num = int(num ** 0.5) + 1
for number in range(3, sqrt_of_num, 2):
if num % number == 0:
return False
return True
def happy_primes(r):
happy_primes = []
for i in r:
if is_happy(i) and is_prime(i):
happy_primes.append(i)
return happy_primes
...
----------------------------------------------------------------------
Ran 3 tests in 0.121s

OK
Петър Парушев
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Петър Парушев
import math
def is_happy(number):
if number == 1:
return True
if number == 0 or number == 4:
return False
sum_of_squares = 0
while number != 0:
sum_of_squares += (number % 10) ** 2
number = int(number / 10)
return is_happy(sum_of_squares)
def is_prime(number):
if number == 0 or number == 1:
return False
if number == 2 or number == 3:
return True
if number % 2 == 0 or number % 3 == 0: # accounts for 2/3 of cases
return False
for i in range(5, int(math.sqrt(number)) + 1, 2):
if number % i == 0:
return False
return True
def happy_primes(range_of_numbers):
result = []
for i in range_of_numbers:
if is_happy(i) and is_prime(i):
result.append(i)
return result
...
----------------------------------------------------------------------
Ran 3 tests in 0.063s

OK
Деян Камбуров
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Деян Камбуров
def is_happy(number):
sum_of_squares = 0
visited_squares = set()
visited_squares.add(number)
while sum_of_squares not in visited_squares:
sum_of_squares = 0
visited_squares.add(number)
while number != 0:
digit = number % 10
number = int(number / 10)
sum_of_squares += digit ** 2
if sum_of_squares == 1:
return True
number = sum_of_squares
return False
def is_prime(number):
if number <= 1:
return False
for index in range(2, int(number/2) + 1):
if number % index == 0:
return False
return True
def happy_primes(iterable_integers):
happy_primes = []
for number in iterable_integers:
if is_prime(number) and is_happy(number):
happy_primes.append(number)
return happy_primes
...
----------------------------------------------------------------------
Ran 3 tests in 0.064s

OK
Момчил Анастасов
  • Некоректно
  • 1 успешни тест(а)
  • 2 неуспешни тест(а)
Момчил Анастасов
def is_happy(number):
if number != 0:
possible_happy_number = 0
number_string = str(number)
for i in number_string:
i_int = int(i)
possible_happy_number += i_int**2
if possible_happy_number == 1:
return True
else:
is_happy(possible_happy_number)
if not True:
return False
else:
return True
def happy_primes(numbers):
my_list = list()
for last in numbers:
pass
last += 1
for i in range(2, last):
if last % i != 0 and is_happy(i):
my_list.append(i)
return my_list
.EE
======================================================================
ERROR: test_happy_primes_up_to_500 (test.TestHappyNumbers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "lib/language/python/runner.py", line 60, in thread
    raise it.exc_info[1]
  File "lib/language/python/runner.py", line 48, in run
    self.result = func(*args, **kwargs)
  File "/tmp/d20140312-30972-yywjcp/test.py", line 37, in test_happy_primes_up_to_500
    self.assertEqual(solution.happy_primes(range(0, 500)), happy_primes)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 23, in happy_primes
    if last % i != 0 and is_happy(i):
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 4, in is_happy
    number_string = str(number)
RuntimeError: maximum recursion depth exceeded while getting the str of an object

======================================================================
ERROR: test_no_unhappy__numbers_up_to_a_point (test.TestHappyNumbers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "lib/language/python/runner.py", line 60, in thread
    raise it.exc_info[1]
  File "lib/language/python/runner.py", line 48, in run
    self.result = func(*args, **kwargs)
  File "/tmp/d20140312-30972-yywjcp/test.py", line 30, in test_no_unhappy__numbers_up_to_a_point
    self.assertFalse(solution.is_happy(unhappy_number),
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 11, in is_happy
    is_happy(possible_happy_number)
  File "/tmp/d20140312-30972-yywjcp/solution.py", line 4, in is_happy
    number_string = str(number)
RuntimeError: maximum recursion depth exceeded while getting the str of an object

----------------------------------------------------------------------
Ran 3 tests in 0.097s

FAILED (errors=2)
Тихомир Янев
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Тихомир Янев
import re
def is_happy(number, occured = []):
if number == 1:
return True
if number in occured:
return False
return is_happy(sum([int(digit) ** 2 for digit in str(number)]), occured + [number])
def is_prime(number):
return not re.match(r'^1?$|^(11+?)\1+$', '1' * number)
def happy_primes(iterable):
return [y for y in list(iterable) if is_prime(y) and is_happy(y)]
...
----------------------------------------------------------------------
Ran 3 tests in 0.182s

OK
Моника Илиева
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Моника Илиева
def to_digit(number):
return list(int(digit) for digit in str(number))
def is_happy(number):
while number.__ne__(1):
if number == 4 or number <= 0:
break
elif number < 10:
return is_happy(number ** 2)
else:
sum_of_digits = sum([digit ** 2 for digit in to_digit(number)])
return is_happy(sum_of_digits)
return number == 1
def is_prime(number):
return number >= 2 and not([num for num in range(2, number)
if number % num == 0])
def happy_primes(range_):
happy_primes = [number for number in range_
if is_happy(number) and is_prime(number)]
return happy_primes
...
----------------------------------------------------------------------
Ran 3 tests in 0.167s

OK
Георги Георгиев
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Георги Георгиев
def is_happy(n):
if n <= 0:
return False
checked = set()
while n != 1:
checked.add(n)
n = sum(int(digit) ** 2 for digit in str(n))
if n in checked:
return False
return True
def is_prime(n):
if n < 2:
return False
for x in range(2, round(n ** (1/2) + 1)):
if n % x == 0:
return False
return True
def happy_primes(integers):
return [x for x in integers if is_prime(x) and is_happy(x)]
...
----------------------------------------------------------------------
Ran 3 tests in 0.102s

OK
Найден Найдев
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Найден Найдев
l_nums = []
def is_happy(num):
global l_nums
sum_p = 0
if num in l_nums:
l_nums = []
return False
l_nums.append(num)
while num > 0:
sum_p += ((num % 10)**2)
num = num // 10
if sum_p == 1:
l_nums = []
return True
else:
return is_happy(sum_p)
def is_prime(num):
if num == 1:
return False
for i in range(2, num//2 + 1):
if num % i == 0:
return False
return True
def happy_primes(ll_nums):
return [num for num in ll_nums if is_happy(num) and is_prime(num)]
...
----------------------------------------------------------------------
Ran 3 tests in 0.065s

OK
Дамян Манев
  • Некоректно
  • 0 успешни тест(а)
  • 3 неуспешни тест(а)
Дамян Манев
from math import sqrt
FIRST_HAPPY_NUMBERS = (1, 7, 10, 13, 19, 23, 28, 31, 32, 44, 49)
def is_prime(number):
if number <= 1:
return False
if number == 2:
return True
for i in range(2, int(sqrt(number) + 1)):
if not number%i:
return False
return True
def is_happy(number):
copy_of_number = number
while copy_of_number >= 50:
copy_of_number = sum(int(digit) for digit in str(number))
return copy_of_number in FIRST_HAPPY_NUMBERS
def happy_primes(array_of_numbers):
return [x for x in array_of_numbers if is_happy(x) and ais_prime(x)]
FEF
======================================================================
ERROR: test_happy_primes_up_to_500 (test.TestHappyNumbers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "lib/language/python/runner.py", line 60, in thread
    raise it.exc_info[1]
  File "lib/language/python/runner.py", line 48, in run
    self.result = func(*args, **kwargs)
  File "/tmp/d20140312-30972-1bgplvt/test.py", line 37, in test_happy_primes_up_to_500
    self.assertEqual(solution.happy_primes(range(0, 500)), happy_primes)
  File "/tmp/d20140312-30972-1bgplvt/solution.py", line 22, in happy_primes
    return [x for x in array_of_numbers if is_happy(x) and	ais_prime(x)]
  File "/tmp/d20140312-30972-1bgplvt/solution.py", line 22, in <listcomp>
    return [x for x in array_of_numbers if is_happy(x) and	ais_prime(x)]
NameError: global name 'ais_prime' is not defined

======================================================================
FAIL: test_all_happy_numbers_up_to_a_point (test.TestHappyNumbers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "lib/language/python/runner.py", line 60, in thread
    raise it.exc_info[1]
  File "lib/language/python/runner.py", line 48, in run
    self.result = func(*args, **kwargs)
  File "/tmp/d20140312-30972-1bgplvt/test.py", line 26, in test_all_happy_numbers_up_to_a_point
    happy_number))
AssertionError: False is not true : 188 is expected to be a happy number

======================================================================
FAIL: test_no_unhappy__numbers_up_to_a_point (test.TestHappyNumbers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "lib/language/python/runner.py", line 60, in thread
    raise it.exc_info[1]
  File "lib/language/python/runner.py", line 48, in run
    self.result = func(*args, **kwargs)
  File "/tmp/d20140312-30972-1bgplvt/test.py", line 32, in test_no_unhappy__numbers_up_to_a_point
    unhappy_number))
AssertionError: True is not false : 52 is expected to be an unhappy number

----------------------------------------------------------------------
Ran 3 tests in 0.004s

FAILED (failures=2, errors=1)
Мария Донева
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Мария Донева
def is_happy(number):
sums = list()
while number > 1 and number not in sums:
sums.append(number)
number = get_sum(number)
return number == 1
def get_sum(number):
sum = 0
number_string = str(number)
for digit in number_string:
sum += int(digit)**2
return sum
def is_prime(number):
if number == 1 or number == 0:
return False
for num in range(2, number):
if number % num == 0:
return False
return True
def happy_primes(xrange):
primes_and_happy_numbers = list()
for number in xrange:
if is_happy(number) and is_prime(number):
primes_and_happy_numbers.append(number)
return primes_and_happy_numbers
...
----------------------------------------------------------------------
Ran 3 tests in 0.113s

OK
Беатрис Бонева
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Беатрис Бонева
SQUARE = dict([(digit, int(digit) ** 2) for digit in "0123456789"])
def is_happy(number):
s = set()
while (number > 1) and (number not in s):
s.add(number)
number = sum(SQUARE[d] for d in str(number))
return number == 1
def is_prime(number):
if number == 1:
return False
for divisor in range(2, number):
if number % divisor == 0:
return False
return True
def happy_primes(numbers):
result = []
for num in numbers:
if is_happy(num) and is_prime(num):
result.append(num)
return result
...
----------------------------------------------------------------------
Ran 3 tests in 0.061s

OK
Александър Чешмеджиев
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Александър Чешмеджиев
def sum_of_digit_squares(number):
digit_sum = 0
string_number = str(number);
for digit in string_number:
digit_sum += int(digit) ** 2
return digit_sum
def is_happy(number):
current_num = sum_of_digit_squares(number)
visited_list = list()
while True:
if current_num == 1:
return True
break
elif current_num in visited_list:
return False
break
else:
visited_list.append(current_num)
current_num = sum_of_digit_squares(current_num)
def is_prime(number):
a = 2
while number >= a:
if number % a == 0 and a != number:
return False
elif number % a != 0:
a += 1
elif number % a == 0 and a == number:
return True
def happy_primes(integer_list):
filtered_list = list()
for integer in integer_list:
if is_happy(integer) and is_prime(integer):
filtered_list.append(integer)
return filtered_list
...
----------------------------------------------------------------------
Ran 3 tests in 0.109s

OK
Гергана Маврова
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Гергана Маврова
from math import sqrt
def is_prime(number):
if number > 1:
if number == 2:
return True
if number % 2 == 0:
return False
for current in range(3, int(sqrt(number) + 1), 2):
if number % current == 0:
return False
return True
return False
def is_happy(number):
past = set()
while number != 1:
number = sum(int(i)**2 for i in str(number))
if number in past:
return False
past.add(number)
return True
def happy_primes(numbers):
primes_happy = []
for number in numbers:
if is_prime(number) is True and is_happy(number) is True:
primes_happy.append(number)
return primes_happy
...
----------------------------------------------------------------------
Ran 3 tests in 0.097s

OK
Константин Тодоров
  • Некоректно
  • 2 успешни тест(а)
  • 1 неуспешни тест(а)
Константин Тодоров
def is_happy(integer):
integer = str(integer)
visited = set()
while integer != 1:
integer = sum(int(digit)**2 for digit in str(integer))
if integer in visited:
return False
visited.add(integer)
return True
def is_prime(integer):
if integer == 1:
return False
if integer == 2:
return True
for number in range(3,integer):
if integer % number == 0:
return False
return True
def happy_primes(numbers):
for number in numbers:
if is_prime(number) and is_happy(number):
print(number)
.F
Stdout:
7
13
19
23
31
79
97
103
109
139
167
193
239
263
293
313
331
367
379
383
397
409
487
.
======================================================================
FAIL: test_happy_primes_up_to_500 (test.TestHappyNumbers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "lib/language/python/runner.py", line 60, in thread
    raise it.exc_info[1]
  File "lib/language/python/runner.py", line 48, in run
    self.result = func(*args, **kwargs)
  File "/tmp/d20140312-30972-1fqv042/test.py", line 37, in test_happy_primes_up_to_500
    self.assertEqual(solution.happy_primes(range(0, 500)), happy_primes)
AssertionError: None != [7, 13, 19, 23, 31, 79, 97, 103, 109, 139, 167, 193, 239, 263, 293, 313, 331, 367, 379, 383, 397, 409, 487]

Stdout:
7
13
19
23
31
79
97
103
109
139
167
193
239
263
293
313
331
367
379
383
397
409
487

----------------------------------------------------------------------
Ran 3 tests in 0.096s

FAILED (failures=1)
Милен Христов
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Милен Христов
def is_happy(input_number):
if input_number == 1:
return True
if input_number <= 0:
return False
CYCLIC_NUMBER = 4
digits_sum = 0
initial_number = input_number
while digits_sum != CYCLIC_NUMBER:
digits_sum = sum(int(i)*int(i) for i in str(input_number))
input_number = digits_sum
if digits_sum == 1:
return True
return False
def is_prime(input_number):
if input_number == 2:
return True
if input_number < 2 or input_number % 2 == 0:
return False
for item in range(3, int(input_number**0.5)+1, 2):
if input_number % item == 0:
return False
return True
def happy_primes(iterable):
return [item for item in iterable if is_prime(item) == True and is_happy(item)]
...
----------------------------------------------------------------------
Ran 3 tests in 0.066s

OK
Емилиян Паунов
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Емилиян Паунов
def is_happy(random_number):
'''Evaluating if a given random number is happy'''
checked_numbers = set()
while random_number not in checked_numbers:
counter = 0
for digit in str(random_number):
counter += int(digit) ** 2
if counter == 1:
return True
else:
checked_numbers.add(random_number)
random_number = counter
else:
return False
def is_prime(random_number):
'''Evaluating if a given number is prime'''
if random_number > 1:
counter = 2
while counter < random_number:
if (random_number/counter).is_integer():
return False
counter += 1
else:
return True
return False
def happy_primes(iterable):
'''Returns happy + prime numbers in an iterable'''
happy_iterables = list(filter(is_happy, iterable))
return list(filter(is_prime, happy_iterables))
...
----------------------------------------------------------------------
Ran 3 tests in 0.093s

OK
Божидар Михайлов
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Божидар Михайлов
def is_happy(number):
if number < 0:
return False
square_char = lambda digit: int(digit)**2
seen = set()
while number != 1 and number not in seen:
seen.add(number)
number = sum(map(square_char, str(number)))
return number == 1;
def is_prime(number):
if number < 2:
return False
for i in range(2, int(number**0.5) + 1):
if number % i == 0:
return False
return True
def happy_primes(numbers):
return [n for n in numbers if is_happy(n) and is_prime(n)]
...
----------------------------------------------------------------------
Ran 3 tests in 0.115s

OK
Гено Чипилски
  • Некоректно
  • 2 успешни тест(а)
  • 1 неуспешни тест(а)
Гено Чипилски
def is_happy(number):
attemps = 0
max_attemps = 100
while number != 1:
str_number = str(number)
attemps += 1
if attemps > max_attemps:
return False
number = 0
for i in range(0, len(str_number)):
number += int(str_number[i]) * int(str_number[i])
return True
def happy_primes(numbers):
happy_numbers = []
for number in numbers:
if is_happy(number):
happy_numbers.append(number)
return happy_numbers
.F.
======================================================================
FAIL: test_happy_primes_up_to_500 (test.TestHappyNumbers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "lib/language/python/runner.py", line 60, in thread
    raise it.exc_info[1]
  File "lib/language/python/runner.py", line 48, in run
    self.result = func(*args, **kwargs)
  File "/tmp/d20140312-30972-1k4rrrm/test.py", line 37, in test_happy_primes_up_to_500
    self.assertEqual(solution.happy_primes(range(0, 500)), happy_primes)
AssertionError: Lists differ: [1, 7, 10, 13, 19, 23, 28, 31,... != [7, 13, 19, 23, 31, 79, 97, 10...

First differing element 0:
1
7

First list contains 53 additional elements.
First extra element 23:
130

+ [7,
- [1,
-  7,
-  10,
   13,
   19,
   23,
-  28,
   31,
-  32,
-  44,
-  49,
-  68,
-  70,
   79,
-  82,
-  86,
-  91,
-  94,
   97,
-  100,
   103,
   109,
-  129,
-  130,
-  133,
   139,
   167,
-  176,
-  188,
-  190,
-  192,
   193,
-  203,
-  208,
-  219,
-  226,
-  230,
-  236,
   239,
-  262,
   263,
-  280,
-  291,
   293,
-  301,
-  302,
-  310,
   313,
-  319,
-  320,
-  326,
-  329,
   331,
-  338,
-  356,
-  362,
-  365,
   367,
-  368,
-  376,
   379,
   383,
-  386,
-  391,
-  392,
   397,
-  404,
   409,
-  440,
-  446,
-  464,
-  469,
-  478,
-  487,
?     ^

+  487]
?     ^

-  490,
-  496]

----------------------------------------------------------------------
Ran 3 tests in 0.846s

FAILED (failures=1)
Пламен Димитров
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Пламен Димитров
import math
def calculate_new_num(expres):
unhappy_num = set([4, 16, 37, 58, 89, 145, 42, 20])
result = 0
len_of_expresion = len(expres)
for itera in range(len_of_expresion):
result += int(expres[itera])**2
if result in unhappy_num:
result = 0
return result
return result
def is_happy(number):
result = number
while 1:
result = calculate_new_num(str(result))
if result == 1:
return True
elif result == 0:
return False
def is_prime(number):
if number < 2:
return False
for check_num in range(2, int(math.sqrt(number)+1)):
if(number % check_num == 0):
return False
return True
def happy_primes(iterable_object):
primes_and_happy = []
for number in iterable_object:
if(is_prime(number)):
if(is_happy(number)):
primes_and_happy.append(number)
return primes_and_happy
...
----------------------------------------------------------------------
Ran 3 tests in 0.056s

OK
Иван Латунов
  • Некоректно
  • 2 успешни тест(а)
  • 1 неуспешни тест(а)
Иван Латунов
from math import sqrt
def split_digit(n):
if (n < 10):
return [n]
else:
split = []
number = n
while (number != 0):
split.append(number % 10)
number //= 10
return split
def is_prime(n):
if (n < 2):
return False
else:
for i in range(2, int(sqrt(n))):
if(n % i == 0):
return False
return True
def is_happy(n):
current_number = n
iterated_items = []
while (True):
split_number = split_digit(current_number)
current_number = 0
for i in split_number:
current_number += int(i) * int(i)
if(current_number == 1):
return True
elif current_number in iterated_items:
return False
else:
iterated_items.append(current_number)
def happy_primes(given_range):
happy_primes_list = []
for i in given_range:
if(is_prime(i) and is_happy(i)):
happy_primes_list.append(i)
return happy_primes_list
.F.
======================================================================
FAIL: test_happy_primes_up_to_500 (test.TestHappyNumbers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "lib/language/python/runner.py", line 60, in thread
    raise it.exc_info[1]
  File "lib/language/python/runner.py", line 48, in run
    self.result = func(*args, **kwargs)
  File "/tmp/d20140312-30972-1vni1eb/test.py", line 37, in test_happy_primes_up_to_500
    self.assertEqual(solution.happy_primes(range(0, 500)), happy_primes)
AssertionError: Lists differ: [7, 13, 19, 23, 31, 49, 79, 97... != [7, 13, 19, 23, 31, 79, 97, 10...

First differing element 5:
49
79

First list contains 1 additional elements.
First extra element 23:
487

  [7,
   13,
   19,
   23,
   31,
-  49,
   79,
   97,
   103,
   109,
   139,
   167,
   193,
   239,
   263,
   293,
   313,
   331,
   367,
   379,
   383,
   397,
   409,
   487]

----------------------------------------------------------------------
Ran 3 tests in 0.084s

FAILED (failures=1)
Стоянка Йовкова
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Стоянка Йовкова
def is_happy(number):
total = sum_digits(number)
while total > 9:
total = sum_digits(total)
if total == 1:
result = True
else:
result = False
return result
def happy_primes(number):
happy_and_prime = set()
for i in number:
if is_prime(i) == True and is_happy(i) == True:
happy_and_prime.add(i)
return sorted(happy_and_prime)
def sum_digits(number):
total = 0
while number:
digit = number % 10
total += digit ** 2
number //= 10
return total
def is_prime(number):
if number > 2 and number%2 != 0:
prime = True
k = 3
while k <= (number ** 0.5) and prime == True:
if number%k == 0:
prime = False
k += 2
else:
prime = False
return prime
...
----------------------------------------------------------------------
Ran 3 tests in 0.029s

OK
Цветислав Викторов
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Цветислав Викторов
def sum_sqr(a):
x=a
sum1 = 0
while x>0:
sum1 = sum1 + (x%10)*(x%10)
x=x/10
x=int(x)
return sum1
def is_happy(a):
x=a
arguments = []
while x!=1 and x not in arguments:
arguments.append(x)
x=sum_sqr(x)
return x==1
def is_prime(a):
if a<2:
return False
for i in range(2,a):
if a%i == 0 :
return False
return True
def happy_primes(a):
happy_primes_list = []
for i in a:
if is_happy(i) and is_prime(i):
happy_primes_list.append(i)
return happy_primes_list
...
----------------------------------------------------------------------
Ran 3 tests in 0.078s

OK
Станислав Димитров
  • Некоректно
  • 2 успешни тест(а)
  • 1 неуспешни тест(а)
Станислав Димитров
def is_happy(n):
past = set()
while n != 1:
n = sum(int(i)**2 for i in str(n))
if n in past:
return False
past.add(n)
return True
.E.
======================================================================
ERROR: test_happy_primes_up_to_500 (test.TestHappyNumbers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "lib/language/python/runner.py", line 60, in thread
    raise it.exc_info[1]
  File "lib/language/python/runner.py", line 48, in run
    self.result = func(*args, **kwargs)
  File "/tmp/d20140312-30972-ikg7j6/test.py", line 37, in test_happy_primes_up_to_500
    self.assertEqual(solution.happy_primes(range(0, 500)), happy_primes)
AttributeError: 'module' object has no attribute 'happy_primes'

----------------------------------------------------------------------
Ran 3 tests in 0.088s

FAILED (errors=1)
Дарина Кръстева
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Дарина Кръстева
def split_digits(number):
all_digits = []
while number != 0:
current_digit = number % 10
all_digits.insert(0, current_digit)
number = int((number - current_digit) / 10)
return all_digits
def is_happy(number):
checked_digits_combinations = set()
while True:
if number == 1:
return True
checked_digits_combinations.add(number)
number = sum([digit ** 2 for digit in split_digits(number)])
if number in checked_digits_combinations:
return False
def is_prime(number):
if number == 0 or number == 1:
return False
else:
for current_number in range(2,number):
if number % current_number == 0:
return False
return True
def happy_primes(sequence_to_select_from):
return [number for number in sequence_to_select_from
if is_happy(number) and is_prime(number)]
...
----------------------------------------------------------------------
Ran 3 tests in 0.348s

OK
Георги Йорданов
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Георги Йорданов
def is_prime(number):
if number == 2:
return True
if number == 1 or number % 2 == 0:
return False
for i in range(3, number//2 + 1, 2):
if number % i == 0:
return False
return True
def get_number_digits(number):
number_digits = []
while number != 0:
number_digits.append(number % 10)
number = number // 10
return number_digits
def is_happy(number):
if number <= 0:
return False
numbers_chain = []
number_digits = []
current_number = number
while current_number not in numbers_chain:
numbers_chain.append(current_number)
number_digits = [int(digit) for digit in str(current_number)]
squares = [x*x for x in number_digits]
current_number = sum(squares)
if current_number == 1:
return True
return False
def happy_primes(integers):
happy_primes_list = []
for i in integers:
if is_happy(i) and is_prime(i):
happy_primes_list.append(i)
return happy_primes_list
...
----------------------------------------------------------------------
Ran 3 tests in 0.133s

OK
Велина Дойчева
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Велина Дойчева
import math
from functools import reduce
def is_happy(number):
digit_sums = []
digit_sum = number
while digit_sum != 1:
digit_sum = reduce(lambda x,y: x + y, map(lambda x: int(x)**2, str(digit_sum)))
if digit_sum in digit_sums:
return False
else:
digit_sums.append(digit_sum)
return True
def is_prime(number):
if number < 2:
return False
else:
return all([number%i for i in range(2, int(math.sqrt(number)) + 1)])
def happy_primes(integers):
return [i for i in integers if is_prime(i) and is_happy(i)]
...
----------------------------------------------------------------------
Ran 3 tests in 0.113s

OK
Стоян Христов
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Стоян Христов
import math
def is_happy(number_to_check):
visited = set()
while True:
if number_to_check == 1:
return True
number_to_check = sum(int(digit) ** 2 for digit in str(number_to_check))
if number_to_check in visited:
return False
visited.add(number_to_check)
def is_prime(number_to_check):
if number_to_check == 1:
return False
for number in range(2, int(math.sqrt(number_to_check)) + 1):
if number_to_check % number == 0:
return False
return True
def happy_primes(given_range):
result = []
for number in given_range:
if is_prime(number) and is_happy(number):
result.append(number)
return result
...
----------------------------------------------------------------------
Ran 3 tests in 0.090s

OK
Виктор Иванов
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Виктор Иванов
def find_sum_of_squares(n):
res = 0
while n != 0:
res += (n % 10) ** 2
n //= 10
return res
def is_happy(n):
used = dict()
while n != 1:
n = find_sum_of_squares(n)
if n in used:
break
used[n] = True
if n == 1:
return True
return False
def is_prime(n):
if n == 1:
return False
for i in range(2, n // 2 + 1):
if n % i == 0:
return False
return True
def happy_primes(numbers):
res = []
for current in numbers:
if is_happy(current) and is_prime(current):
res.append(current)
return res
...
----------------------------------------------------------------------
Ran 3 tests in 0.149s

OK
Атанас Пройчев
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Атанас Пройчев
def is_happy(number):
list_of_results = []
current_number = number
while current_number != 1:
squared_digits_of_number = 0
for digit in str(current_number):
squared_digits_of_number += int(digit) ** 2
if current_number in list_of_results:
return False
else:
list_of_results.append(current_number)
current_number = squared_digits_of_number
return True
def is_prime(number):
if number == 1:
return False
for i in range(2, int(number / 2) + 1):
if number % i == 0:
return False
return True
def happy_primes(iterable):
list_of_happy_primes = []
for number in iterable:
if is_prime(number) and is_happy(number):
list_of_happy_primes.append(number)
return list_of_happy_primes
...
----------------------------------------------------------------------
Ran 3 tests in 0.076s

OK
Теодор Костадинов
  • Некоректно
  • 2 успешни тест(а)
  • 1 неуспешни тест(а)
Теодор Костадинов
def get_digits(n):
digits = []
while n > 0:
digits.append(n % 10)
n = n // 10
return digits
def get_sum_squared(digits):
sum = 0
for digit in digits:
sum = sum + digit * digit
return sum
def is_happy(n):
sequenceOfSums = []
sum = n
hasPattern = False
while not sum == 1 and not hasPattern:
digits = get_digits(sum)
sum = get_sum_squared(digits)
hasPattern = sum in sequenceOfSums
sequenceOfSums.append(sum)
if sum == 1:
return True
else:
return False
def is_prime(n):
if n == 1: return False
prime = True
upperLimit = int(n**(1/2))
for div in range(2,upperLimit):
if n % div == 0:
prime = False
break
return prime
def happy_primes(range):
happyPrimes = []
for number in range:
if is_happy(number) and is_prime(number):
happyPrimes.append(number)
return happyPrimes
.F.
======================================================================
FAIL: test_happy_primes_up_to_500 (test.TestHappyNumbers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "lib/language/python/runner.py", line 60, in thread
    raise it.exc_info[1]
  File "lib/language/python/runner.py", line 48, in run
    self.result = func(*args, **kwargs)
  File "/tmp/d20140312-30972-36msys/test.py", line 37, in test_happy_primes_up_to_500
    self.assertEqual(solution.happy_primes(range(0, 500)), happy_primes)
AssertionError: Lists differ: [7, 13, 19, 23, 31, 49, 79, 97... != [7, 13, 19, 23, 31, 79, 97, 10...

First differing element 5:
49
79

First list contains 1 additional elements.
First extra element 23:
487

  [7,
   13,
   19,
   23,
   31,
-  49,
   79,
   97,
   103,
   109,
   139,
   167,
   193,
   239,
   263,
   293,
   313,
   331,
   367,
   379,
   383,
   397,
   409,
   487]

----------------------------------------------------------------------
Ran 3 tests in 0.082s

FAILED (failures=1)
Мариан Ламбовски
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Мариан Ламбовски
def is_happy (num):
num_list = []
while True:
next_num = 0
while num > 0:
next_num += int((num % 10)** 2)
num = int(num/10)
if next_num == 1:
return True
elif next_num in num_list:
return False
num_list.append(next_num)
num = num_list[-1]
def is_prime (num):
divisor = 2
while divisor <= num/2:
if num % divisor == 0:
return False
divisor += 1
return True and num != 1
def happy_primes (num_list):
happy_primes_list = []
for num in num_list:
if is_happy(num) and is_prime(num):
happy_primes_list.append(num)
return happy_primes_list
...
----------------------------------------------------------------------
Ran 3 tests in 0.102s

OK
Янислав Василев
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Янислав Василев
def is_prime(number):
if number < 2:
return False
if number == 2:
return True
for devisor in range(2, int(number ** 0.5) + 1):
if number % devisor == 0:
return False
return True
def sum_powers(number):
sum = 0
while number > 0:
sum += pow(number % 10, 2)
number //= 10
return sum
def is_happy(number, happy_numbers = set()):
if number < 0:
return False
if number in happy_numbers:
return False
happy_numbers.add(number)
if sum_powers(number) == 1:
happy_numbers.clear()
return True
return(is_happy(sum_powers(number)))
def happy_primes(iterable):
result = []
result = [number for number in iterable
if(is_prime(number) and is_happy(number))]
return result
...
----------------------------------------------------------------------
Ran 3 tests in 0.024s

OK
Александър Наджарян
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Александър Наджарян
def is_happy(num):
repeating_numbers = []
while num > 1:
num = sum(int(x)**2 for x in str(num))
if num in repeating_numbers:
return False
else:
repeating_numbers.append(num)
return True
def is_prime(num):
if num == 0 or num == 1:
return False
for x in range(2, int(num/2)):
if num % x == 0:
return False
return True
def happy_primes(interval):
hap_primes = []
for x in interval:
if is_prime(x) and is_happy(x):
hap_primes.append(x)
return hap_primes
...
----------------------------------------------------------------------
Ran 3 tests in 0.102s

OK
Веляна Димова
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Веляна Димова
def find_digits(number):
l = []
number_string = str(number)
for ch in number_string:
l.append(int(ch))
return l
def is_happy(number):
new_number = 0
visited = []
while new_number != 1 or not(new_number in visited):
new_number = 0
for i in find_digits(number):
new_number += i**2
if new_number == 1:
return True
elif new_number in visited:
return False
else:
visited.append(new_number)
number = new_number
def is_prime(number):
if number < 2:
return False
for i in range(2, number):
if number%i == 0:
return False
return True
def happy_primes(iterable):
happy_prime_list = []
for number in iterable:
if is_happy(number) and is_prime(number):
happy_prime_list.append(number)
return happy_prime_list
...
----------------------------------------------------------------------
Ran 3 tests in 0.124s

OK
Стефан Колчев
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Стефан Колчев
import math
def is_happy(number):
sum_of_squares = 0
numbers = set()
while number > 1 and number not in numbers:
numbers.add(number)
sum_of_squares = 0
while number != 0:
digit = number % 10
sum_of_squares += (digit**2)
number = int(number / 10)
number = sum_of_squares
return number == 1
def happy_primes(numbers_in_range):
happy_prime_numbers = []
for number in numbers_in_range:
is_prime = True
for divisor in range(2, int(math.sqrt(number)) + 1):
if number % divisor == 0:
is_prime = False
break
if is_prime and is_happy(number) and number != 1:
happy_prime_numbers.append(number)
return happy_prime_numbers
...
----------------------------------------------------------------------
Ran 3 tests in 0.062s

OK
Димитър Трендафилов
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Димитър Трендафилов
SQUARES = dict([(c, int(c)**2) for c in "0123456789"])
HAPPY_COMBINATIONS = {1, 7, 13, 19, 23, 28, 44, 49, 68,
79, 129, 133, 139, 167, 188, 226,
236, 239, 338, 356, 367, 368, 379,
446, 469, 478, 556, 566, 888, 899}
def check_combination(num_to_check):
num_to_check = sorted(str(num_to_check))
nonzero_string = ''
for digit in num_to_check:
nonzero_string += digit
return int(nonzero_string) in HAPPY_COMBINATIONS
def is_happy(num_to_check):
while num_to_check >= 1000:
num_to_check = str(num_to_check)
num_to_check = sum(SQUARES[c] for c in num_to_check)
return check_combination(num_to_check)
def sieve_of_eratosthenes(iterable):
excluded = [True] * iterable[len(iterable)-1]
excluded[0] = False
for num in range(2, int(iterable[len(iterable)-1]**0.5)):
if excluded[num - 1]:
current = num*num
while current < iterable[len(iterable)-1]:
excluded[current - 1] = False
current += num
return excluded[iterable[0] - 1:]
def happy_primes(iterable):
if iterable[0] <= 0:
if iterable[len(iterable)-1] <= 1:
return []
iterable = range(1, iterable[len(iterable)-1])
happy_prime_nums = []
primes = sieve_of_eratosthenes(iterable)
for num in iterable:
if primes[num - iterable[0]]:
if is_happy(num):
happy_prime_nums.append(num)
return happy_prime_nums
...
----------------------------------------------------------------------
Ran 3 tests in 0.014s

OK
Момчил Джамбазов
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Момчил Джамбазов
def is_happy(number_to_check):
checked_numbers = set()
happiness = find_digits_happiness(number_to_check)
checked_numbers.add(happiness)
while happiness != 1:
happiness = find_digits_happiness(happiness)
if happiness in checked_numbers:
return False
checked_numbers.add(happiness)
return True
def find_digits_happiness(input_number):
split_numbers = [int(i) for i in str(input_number)]
digits_sum = 0
for digit in split_numbers:
digits_sum += digit ** 2
return digits_sum
def happy_primes(numbers):
return [num for num in numbers if is_happy(num) and is_prime(num)]
def is_prime(number):
if number > 1:
for i in range(2, number):
if number % i == 0:
return False
return True
return False
...
----------------------------------------------------------------------
Ran 3 tests in 0.127s

OK
Владимир Начев
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Владимир Начев
import math
def is_prime(n):
if n <= 1:
return False
else:
for divisor in range(2, int(math.sqrt(n)) + 1):
if n % divisor == 0:
return False
return True
def sum_of_sqr_of_digits(n):
sum = 0
while n:
sum = sum + (n % 10) ** 2
n = n // 10
return sum
def is_happy(n):
squared_sum_of_digits = []
current_sum_of_squared_digits = sum_of_sqr_of_digits(n)
while current_sum_of_squared_digits not in squared_sum_of_digits and\
current_sum_of_squared_digits != 1:
squared_sum_of_digits.append(current_sum_of_squared_digits)
current_sum_of_squared_digits = \
sum_of_sqr_of_digits(current_sum_of_squared_digits)
if current_sum_of_squared_digits == 1:
return True
return False
def happy_primes(array):
return [number for number in array if is_prime(number) and \
is_happy(number)]
...
----------------------------------------------------------------------
Ran 3 tests in 0.049s

OK
Спасимир Тупаров
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Спасимир Тупаров
def is_happy(number):
result = 0
digit_of_number = 0
not_found = True
checked_numbers = []
while not_found:
while number != 0:
digit_of_number = number % 10
number = number // 10
result += digit_of_number ** 2
if result == 1:
return True
elif result in checked_numbers:
return False
else:
checked_numbers.append(result)
number = result
result = 0
def is_prime(number):
if number < 2:
return False
middle_of_number = int(number**0.5) + 1
for divisor in range(2, middle_of_number):
if number % divisor == 0 :
return False
return True
def happy_primes(iterable_object):
happy_prime_numbers = [ x for x in iterable_object if is_happy(x) and is_prime(x)]
return happy_prime_numbers
...
----------------------------------------------------------------------
Ran 3 tests in 0.060s

OK
Стефан Владков
  • Некоректно
  • 1 успешни тест(а)
  • 2 неуспешни тест(а)
Стефан Владков
def is_happy(number):
def is_happy_helper(number, checked_numbers):
if number == 1:
return True
if number in checked_numbers:
return False
checked_numbers.append(number)
new_number = sum_of_squares(number)
return is_happy_helper(new_number, checked_numbers)
return is_happy_helper(number, [])
def sum_of_squares(number):
result = 0
while number > 0:
last_digit = number % 10
result = result + int(last_digit) * int(last_digit)
number = number / 10
return int(result)
def happy_primes(range):
result = []
for number in range:
if is_happy(number) and is_prime(number) and number != 1:
result.append(number)
return result
def is_prime(number):
for i in range(3, number):
if number % i == 0:
return False
return True
.EE
======================================================================
ERROR: test_happy_primes_up_to_500 (test.TestHappyNumbers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "lib/language/python/runner.py", line 57, in thread
    raise TimeoutError
TimeoutError

======================================================================
ERROR: test_no_unhappy__numbers_up_to_a_point (test.TestHappyNumbers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "lib/language/python/runner.py", line 57, in thread
    raise TimeoutError
TimeoutError

----------------------------------------------------------------------
Ran 3 tests in 4.496s

FAILED (errors=2)
Аделина Рудова
  • Коректно
  • 3 успешни тест(а)
  • 0 неуспешни тест(а)
Аделина Рудова
SQUARE = dict([(c, int(c)**2) for c in "0123456789"])
def is_happy(number):
s = set()
while (number > 1) and (number not in s):
s.add(number)
number = sum(SQUARE[d] for d in str(number))
return number == 1
def happy_primes(iterable):
return [number for number in iterable if is_happy(number) and is_prime(number)]
def is_prime(number):
if number == 1:
return False
for i in range(3, number // 2 + 1):
if number % i == 0:
return False
return True
...
----------------------------------------------------------------------
Ran 3 tests in 0.061s

OK
Светлозар Йовчев
  • Некоректно
  • 1 успешни тест(а)
  • 2 неуспешни тест(а)
Светлозар Йовчев
def is_happy(n):
try:
if n == 1:
return True
destroy_number = n
number_of_digits = 0
while destroy_number != 0:
number_of_digits += 1
destroy_number = int(destroy_number/10)
copy = 0
count = 0
for digit in range(0,number_of_digits):
copy += int((n%10) * (n%10))
n = int(n/10)
return is_happy(copy)
except (RuntimeError):
return False
finally:
pass
def happy_primes(n):
import math
number_is_happy = False
number_is_prime = False
happy_numbers = []
for number in list(n):
if is_happy(number) == True:
number_is_happy = True
for divider in range(1,int(math.sqrt(number))):
if number%divider!=0:
number_is_prime = True
if number_is_prime and number_is_happy == True:
happy_numbers.append(number)
number_is_happy = False
number_is_prime = False
return happy_numbers
.EE
======================================================================
ERROR: test_happy_primes_up_to_500 (test.TestHappyNumbers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "lib/language/python/runner.py", line 57, in thread
    raise TimeoutError
TimeoutError

======================================================================
ERROR: test_no_unhappy__numbers_up_to_a_point (test.TestHappyNumbers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "lib/language/python/runner.py", line 57, in thread
    raise TimeoutError
TimeoutError

----------------------------------------------------------------------
Ran 3 tests in 4.148s

FAILED (errors=2)
Димитър Димитров
  • Некоректно
  • 2 успешни тест(а)
  • 1 неуспешни тест(а)
Димитър Димитров
def is_happy(num):
cycle_check = []
new_num = num
while True:
edinici = int(new_num % 10)
desitici = int(new_num / 10)
desitici = int(desitici % 10)
stotici = int(new_num / 100)
stotici = int(stotici % 10)
new_num = edinici**2 + desitici**2 + stotici**2
if new_num == 1:
return True
else:
if new_num in cycle_check:
return False
else:
cycle_check.append(new_num)
def happy_primes(happy_num_list):
happy_numbers = []
primes = []
is_prime = 1
for num in happy_num_list:
if is_happy(num):
happy_numbers.append(num)
for prime in happy_numbers:
if prime == 1:
continue
for i in range(2, int(prime/2)):
if prime % i == 0:
is_prime = 0
break
if is_prime == 0:
is_prime = 1
else:
primes.append(prime)
return (primes)
F..
======================================================================
FAIL: test_all_happy_numbers_up_to_a_point (test.TestHappyNumbers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "lib/language/python/runner.py", line 60, in thread
    raise it.exc_info[1]
  File "lib/language/python/runner.py", line 48, in run
    self.result = func(*args, **kwargs)
  File "/tmp/d20140312-30972-hq67tn/test.py", line 26, in test_all_happy_numbers_up_to_a_point
    happy_number))
AssertionError: False is not true : 1000 is expected to be a happy number

----------------------------------------------------------------------
Ran 3 tests in 0.112s

FAILED (failures=1)