Problem K
Scientific Grading
You recently started working as a TA (teaching assistant)
for your university’s Scientific Computing class.
Today, Professor introduced the scientific notation,
where numbers are written in the form
Given two numbers
As a strict grader, you decided to write a program to grade
students’ answers. You mark a solution correct if and only if
both relative and absolute errors are less
than
Input
The first line of input contains the value of
Output
For each student solution, output Correct if it is considered correct and Incorrect otherwise. The first line of output
indicates if the student’s solution to
Sample Input 1 | Sample Output 1 |
---|---|
+2.000000000e+1 +3.000000000e+2 +3.200000000e+2 -2.800000000e+2 +6.000000000e+3 +6.666666667e-2 |
Correct Correct Correct Correct |
Sample Input 2 | Sample Output 2 |
---|---|
+1.000000000e-1 +1.000000000e-1 +2.000000003e-1 +1.000000000e-18 +1.000000002e-2 +1.000000001e+0 |
Incorrect Incorrect Incorrect Incorrect |