2557 - I2P(I)2022_Yang_lab2 Scoreboard

Time

2022/09/27 18:30:00 2022/09/27 20:30:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
13567 Hot pot time
13574 Baldi's TA

13567 - Hot pot time   

Description

Recently, a hot pot restaurant just opened in Jessie's school, and there are always plenty of people waiting in line.

Given the date and time Jessie arrived at the restaurant and the time that it was finally Jessie's turn to enjoy the hot pot, please calculate how much time had elapsed for Jessie queuing up for it.

Input

Two lines, each line contains a timestamp with the format "yyyy/mm/dd hh:mm:ss", indicating the two moments said in the description.

The two timestamps might be on a different dates.

We guarantee that the time interval is less than 3 hours (10800 seconds).

Output

Output a single line containing one number, how many seconds the time had elapsed. 

Please remember to print "\n" at the end.

Sample Input  Download

Sample Output  Download

Tags




Discuss




13574 - Baldi's TA   

Description

Fortunately, you are hired and now you are a teaching assistant in Baldi's math class. Your first job is to calculate the score for every student in the class. The score will be evaluated by the students' midterm, final exam, and homework. Baldi came up with three ways for the student to determine their score:

formula A: 0.7 * average(mid, final) + 0.3 * hw
formula B: 0.5 * max(mid, final) + 0.3 * min(mid, final) + 0.2 * hw 
formula C: 0.8 * average(mid, final) + 0.1 * hw + 10

Now the students have decided the ways they want to determine their scores. Calculate the result for them.

Baldi would be very angry if you get the answer wrong. He punishes every single person who makes mistakes in math problems.

Input

A single line contains three integers S1, S2, S3, and a char P, which means a student got S1 for the homework, got S2 on the midterm, got S3 on the final exam, and choose formula P to determine the score.

Constraints​:
0  S1, S2, S3  100
P  {'A', 'B', 'C'}

Output

Output the student's score, which is a floating point rounded to 2nd decimal places.
Please remember to print '\n' at the end.

Sample Input  Download

Sample Output  Download

Tags

letsgocamping FlyHighHigh



Discuss