Your job is to benchmark a series of computers. You will read in a computer name, how many clock cycles to do integer operations, how many clock cycles to do floating point operations and the clock speed (in MHz). You are to then run the "Really Bogus Test Suite" on this processor:
The Scientific Mix is a mixture of integer and floating point operations that simulates the mixture of operations that occur in normal scientific computation. The Business Mix is a mixture of integer and floating point operations that occur in normal business computation. The Index Mix is a general purpose mixture of integer and floating point operations that simulates normal computing.
The string "FFFFIFFFFIIFFIF" describes the mixture of integer and floating point operations that make up this benchmark. Each "F" represents a floating point operation. Each "I" represents an integer operation.
To compute a mix, you divide the clockspeed of the processor by the sum of the number of clock cycles it will take to complete the indicated operations.
Your input will be:
Sample Input Data:
Pentium-99
3
7
650
PPC-4
4
6
633
Alpha-IV
2
3
315
MIPS-2000
12
12
500
nevermore
NOTE: Your program should terminate when it encounters a processor named "nevermore".
As an example, let's calculate the "Really Bogus Test Suite" for the Pentium-99. The Scientific Mix of FFFFIFFFFIIFFIF would calculated in the following way:
650/(7+7+7+7+3+7+7+7+7+3+3+7+7+3+7) = 7.3
The Business Mix of IIIFIIIIFIIIFIIIIF would calculated in the following way:
650/(3+3+3+7+3+3+3+3+7+3+3+3+7+3+3+3+3+7) = 9.3
The Index Mix of IIIIIIIIIFIIIF would calculated in the following way:
650/(3+3+3+3+3+3+3+3+3+7+3+3+3+7)=13.0
Sample Output:
Pentium-99
Scientific Mix: 7.3
Business Mix: 9.3
Index Mix: 13.0
PPC-4
Scientific Mix: 7.7
Business Mix: 7.9
Index Mix: 10.6
Alpha-IV
Scientific Mix: 7.7
Business Mix: 7.9
Index Mix: 10.5
MIPS-2000
Scientific Mix: 2.8
Business Mix: 2.3
Index Mix: 3.0
Note: All results should be displayed with only one (1) decimal place (one digit to the right of the decimal point). This digit should be rounded off (5 and larger goes up, 4 and down round down). Exact spacing of numeric output is not critical. Precision (exactly one (1) digit to the right of the decimal point) is critical.
Return to the Top of Page, First Page, Novice Problem Set, or Veteran Problem Set.
Return to the Top of Page, First Page, or Veteran Problem Set.
Return to the LSU High School Programming Contest Homepage