How many?
Time limit1sMemory limit1024 MB
Given the hour and whether alcohol is served, print 320 if it is lunch time (12 to 16) without alcohol, otherwise print 280.
- Level
Easy1 of 10
- Topics
- Implementation
- Solved
- No attempts yet
Problem
Ju-yeong was preparing for MatKor Cup at the Robot Convergence Hall of Korea University when Dong-woo invited him to eat sushi. Ju-yeong went to Howang Sushi. While they ate the assorted sushi, they had this exchange.
- Dong-woo: "How many?"
- Ju-yeong: "Huh?"
- Dong-woo: "The rice grains. How many?"
- Ju-yeong: "What's that supposed to mean?"
- Dong-woo: "Three hundred twenty. A trained sushi master usually makes each piece with three hundred twenty grains of rice. Three hundred twenty is fine for a lunch meal, but on a day like today, or when it is served with alcohol, make it two hundred eighty, okay? So nobody gets too full."
- Ju-yeong: "Where did you pick up this weird stuff?"
- Dong-woo: "Do you know what The Youngest Son of a Chaebol is?"
- Ju-yeong: "No."
Dong-woo was shocked that Ju-yeong did not know the drama that had shaken South Korea. Realizing how serious this was, Dong-woo gathered the MatKor members so that Ju-yeong would watch The Youngest Son of a Chaebol. The MatKor members thought that Ju-yeong would be more interested if he learned about the drama through an algorithm rather than simply watching the video. So they made a problem about the number of rice grains in a sushi piece. Then Dong-woo gave Ju-yeong the problem.
- Dong-woo: "Today I will eat the sushi you make. You must make the sushi by following Chairman Jin-cheol's rule from The Youngest Son of a Chaebol. When I eat sushi with alcohol, or when I eat it at a time that is not lunch, each piece must have 280 grains of rice. When I eat it at lunch without alcohol, each piece must have 320 grains of rice. I have not decided yet when I will eat the sushi or whether I will drink with it. When I tell you the time and whether I have alcohol, you must find the number of rice grains each piece should have."
You are Ju-yeong. Solve Dong-woo's problem for him.
Input
The first line contains an integer (), the hour, and an integer (), whether alcohol is served, separated by a space. of 11 or less is morning, 12 to 16 is lunch, and anything later is evening. of 1 means the sushi is eaten with alcohol, and 0 means it is eaten without alcohol.
Output
On the first line, print the number of rice grains in one piece of sushi that Ju-yeong must make.