Христо обнови решението на 13.03.2012 10:26 (преди над 12 години)
+def prepare_meal(number):
+ if number == 0:
+ return ""
+
+ meal = "";
+
+ while number % 3 == 0:
+ meal = meal + "spam "
+ number = number / 3
+
+ if number % 5 == 0:
+ if meal != "":
+ meal = meal + "and "
+ meal = meal + "eggs"
+
+ return meal.strip();