#t241. 深深的生活
深深的生活
Shenshen's Life
Problem Description
Shenshen is a boy who understands life very well. He pairs each of the 7 days of the week with a different color scheme; from Sunday to Saturday the colors are in this order: red, orange, yellow, green, indigo, blue, violet.
Now write a program that, given the day of the week as input, outputs the color scheme Shenshen should wear that day.
Input Format
An integer representing the day of the week.
Output Format
If , output a lowercase English string representing the corresponding color scheme;
Otherwise, output error.
Sample Input 1
1
Sample Output 1
orange
Sample Input 2
7
Sample Output 2
red
Sample Input 3
10000
Sample Output 3
error
Hint
- Reread the statement: for – output the corresponding color, and for everything else output
error— do not take the remainder, do not wrap around; just use a magnitude comparison. - List the seven color correspondences as a table before writing code (the statement gives the mapping).
- can be as large as , which fits in an
int. - Verify with the samples:
1→orange;10000→error.