QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#590476#8067. Scientific Gradingnickbelov#RE 15ms10476kbPython3624b2024-09-26 00:36:502024-09-26 00:36:51

Judging History

This is the latest submission verdict.

  • [2024-09-26 00:36:51]
  • Judged
  • Verdict: RE
  • Time: 15ms
  • Memory: 10476kb
  • [2024-09-26 00:36:50]
  • Submitted

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


详细

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

result: