Heptathlon
Time limit1sMemory limit128 MB
The program converts seven event records into scores with the given formulas and prints the total for each test case.
- Level
Easy1 of 10
- Topics
- Implementation, Math
- Solved
- No attempts yet
Problem
Minhyeok is competing in a heptathlon. The heptathlon combines the following seven track and field events: the 100 metre hurdles, high jump, shot put, 200 metre dash, long jump, javelin throw, and 800 metre run. Given Minhyeok's record in each event, write a program that converts every record into a score and reports the total.
The total is the sum of the seven event scores. Each event score is computed with the formula below, where is the greatest integer not exceeding (the floor).
- Track events:
- Field events:
, , and are constants fixed for each event, and is the athlete's record. The constants and the unit of for each event are listed below.
Every event score is an integer. Moreover, every field event satisfies , and every track event satisfies .
Input
The first line contains the number of test cases ().
Each test case is one line of seven integers, Minhyeok's records for the events in this order: 100 m hurdles, high jump, shot put, 200 m dash, long jump, javelin throw, 800 m run.
Output
For each test case, print Minhyeok's total score on its own line.