Skip to content
Onsite

Masai School Hurray

EasyP3Coding

For each i from 1 to n, produce one string:

  • "Masai School" if i is a multiple of 35
  • "Masai" if i is a multiple of 7
  • "School" if i is a multiple of 5
  • "Hurray!" otherwise

Return the n strings in order.

Example 1

Input
n = 10
Output
["Hurray!","Hurray!","Hurray!","Hurray!","School","Hurray!","Masai","Hurray!","Hurray!","School"]

Example 2

Input
n = 1
Output
["Hurray!"]

Example 3

Input
n = 5
Output
["Hurray!","Hurray!","Hurray!","Hurray!","School"]

Constraints

  • 1 <= n <= 10^4

Hints

Run checks the 3 visible tests, Submit all 8.