/ SeriousOJ /

Record Detail

Runtime Error


  
# Status Time Cost Memory Cost
#1 Wrong Answer 20ms 3.074 MiB
#2 Runtime Error Traceback (most recent call last): File "foo.py", line 20, in <module> ValueError: invalid literal for int() with base 10: '\r' 20ms 3.066 MiB
#3 Wrong Answer 29ms 3.211 MiB
#4 Wrong Answer 29ms 3.316 MiB
#5 Wrong Answer 29ms 3.246 MiB
#6 Wrong Answer 29ms 3.336 MiB

Code

q = input()
n = int(input())
query = []

for _ in range(n):
    x, y = map(int, input().split())
    query.append([x, y])

for x, y in query:
    m = q[q.index('=')+1:q.index('x')]
    c = q[q.index('x')+1:]

    if m == '':
        m = 1
    if c == '':
        c = 0

    print(m,c)

    if int(m) * x + int(c) == y:
        print("YES")
    else:
        print("NO")

Information

Submit By
Type
Submission
Problem
P1015 Friend in need is a friend indeed
Contest
Brain booster - 1
Language
Python 3 (Python 3.12.3)
Submit At
2023-12-31 15:49:39
Judged At
2024-10-03 14:05:02
Judged By
Score
0
Total Time
29ms
Peak Memory
3.336 MiB