Logo
(追記) (追記ここまで)

34389번 - Mines Meal Plans 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 2048 MB37302586.207%

문제

Students at Mines who live in the residence halls must have a meal plan. The following meal plans are available:

Plan Info
Marble 19ドル$ meals/week, $\200ドル$ Munch Money
Marble+ 19ドル$ meals/week, $\350ドル$ Munch Money
Quartz 14ドル$ meals/week, $\200ドル$ Munch Money
Quartz+ 14ドル$ meals/week, $\350ドル$ Munch Money

A student can get a meal by either using one of their meals swipes, or spending some of their Munch Money. If they have used all of their meal swipes or spent all of their munch money for their meal plan, then they can no longer use that option to get a meal. Given data about the meal swipes and Munch Money used by a student, can you determine what options they have for getting a meal?

입력

The first line of input will be an integer 1ドル \leq N \leq 100,ドル the number of students to follow. The next $N$ lines will have four space-separated values: a string containing the name of the student, a string containing the name of their meal plan, an integer representing how many meal swipes they have used, and a real number with at most 2ドル$ digits after the decimal point representing how much munch money they have left.

Input Restrictions

  • The meal plan names will be one of "Marble", "Marble+", "Quartz", or "Quartz+".
  • Munch Money spent will be between 0ドル.00$ and the maximum amount of munch money allowed by the meal plan.
  • The number of meal swipes used will be between 0ドル$ and the maximum amount of meal swipes allowed by the plan.

Money values are guaranteed to be given with at least one digit before the decimal point, and exactly two digits after the decimal point. The whole-number part of the value will not have any unnecessary leading zeros.

출력

Output should be in the format X Y Z Custom Text where X is the student's name, Y is the student's remaining number of meal swipes, and Z is the student's remaining amount of munch money, and Custom Text is one of the following depending on which of the four scenarios have occurred:

  • Use meal swipe or munch money --- the student has meal swipes left and munch money left,
  • Use munch money --- the student has no meal swipes left, but has munch money,
  • Use meal swipe --- the student has no munch money left, but has meal swipes remaining,
  • Go to Downtown Golden! --- the student has no munch money and no meal swipes remaining.

Munch money should be printed with at least one digit before the decimal point, and exactly two digits after the decimal point. The whole-number part of the value must not have any unnecessary leading zeros.

제한

예제 입력 1

3
Ethan Marble+ 17 325.67
Elijah Quartz 14 200.00
Finn Quartz+ 14 167.34

예제 출력 1

Ethan 2 24.33 Use meal swipe or munch money
Elijah 0 0.00 Go to Downtown Golden!
Finn 0 182.66 Use munch money

예제 입력 2

2
Emily Quartz 13 11.11
Dominique Quartz 14 195.34

예제 출력 2

Emily 1 188.89 Use meal swipe or munch money
Dominique 0 4.66 Use munch money

노트

출처

School > CS@Mines > CS@Mines HSPC 2022 > Beginner J번

  • 문제를 만든 사람: Ethan Richards
(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /