Masai School Hurray
EasyP3Coding
For each i from 1 to n, produce one string:
"Masai School"ifiis a multiple of 35"Masai"ifiis a multiple of 7"School"ifiis 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
Give it a real attempt first. Run shows which examples fail.
Saved automatically
Run checks the 3 visible tests, Submit all 8. ⌘Enter runs, ⌘⇧Enter submits.