QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#590476 | #8067. Scientific Grading | nickbelov# | RE | 15ms | 10476kb | Python3 | 624b | 2024-09-26 00:36:50 | 2024-09-26 00:36:51 |
Judging History
answer
def error(inp, res):
if abs(inp - res) >= 1e-9:
print("Incorrect")
return False
rela = abs(inp - res) / abs(res)
if rela >= 1e-9:
print("Incorrect")
return False
print("Correct")
return True
a = float(input())
b = float(input())
good = True
val = a + b
res = float(input())
if not error(val, res):
good = False
val = a-b
res = float(input())
if not error(val, res):
good = False
val = a*b
res = float(input())
if not error(val, res):
good = False
val = a/b
res = float(input())
if not error(val, res):
good = False
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 15ms
memory: 10476kb
input:
+2.000000000e+1 +3.000000000e+2 +3.200000000e+2 -2.800000000e+2 +6.000000000e+3 +6.666666667e-2
output:
Correct Correct Correct Correct
result:
ok 4 lines
Test #2:
score: 0
Accepted
time: 12ms
memory: 10456kb
input:
+1.000000000e-1 +1.000000000e-1 +2.000000003e-1 +1.000000000e-18 +1.000000002e-2 +1.000000001e+0
output:
Incorrect Incorrect Incorrect Incorrect
result:
ok 4 lines
Test #3:
score: -100
Dangerous Syscalls
input:
+9.999999999e+400000000 +1.000000000e-400000009 +9.999999999e+400000000 +9.999999999e+400000000 +9.999999999e-9 +9.999999999e+800000009
output:
Correct Correct Correct