[BOJ 6871] The Cell Sell
View as PDF
Submit solution
Assembly, Awk, C, C++, Java, Pascal, Perl, Python, Sed, Text
Points:
1
Time limit:
1.0s
Memory limit:
128M
Problem types
Allowed languages
Moe Bull has a cell phone and after a month of use is trying to decide which price plan is the best for his usage pattern. He has two options, each plan has different costs for daytime minutes, evening minutes and weekend minutes.</p>
| Plan | Costs | ||
|---|---|---|---|
| daytime | evening | weekend | |
| A | 100 free minutes then 25 cents per minute | 15 cents per minute | 20 cents per minute |
| B | 250 free minutes then 45 cents per minute | 35 cents per minute | 25 cents per minute |
Write a program that will input the number of each type of minutes and output the cheapest plan for this usage pattern, using the format shown below. The input will be in the order of daytime minutes, evening minutes and weekend minutes. In the case that the two plans are the same price, output both plans.
입력 형식
출력 형식
예제 입력
251
10
60
예제 출력
Plan A costs 51.25
Plan B costs 18.95
Plan B is cheapest.
Comments