given numbers a and b. Decide in the integers equation Ax + B = 0. Display everything
integer solutions for this equation, if their number of course, output
the word “no” if there are no solutions, output the word “inf”, if integer
solutions infinitely a lot.
Two integers are introduced, not exceeding 30000 in absolute
Display the answer to the task.
What is wrong with the code? It gives out that the answer is incorrect:
a = int (input ()) B = INT (INPUT ()) IF a! = B: IF B% a == 0: Print (-b // a) ELSE: PRINT ('NO') IF B == 0: PRINT ('INF') ELSE: PRINT ('NO')
Answer 1, Authority 100%
a = int (input ()) B = INT (INPUT ()) if (a == 0 and b == 0): PRINT ('INF') ELIF (A == 0 OR (B% A)! = 0): PRINT ('NO') ELSE: Print (int (-b / a))