解方程
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
Background
Special for beginners, ^_^
Description
解方程(20分)
编写一个程序A.cpp,求关于x的方程 ax+b=cx+d 解的情况。
Format
Input
一行4个整数,分别代表 a b c d.
Output
如果有唯一解,输出解,此时保证解是一个整数。
如果有无数个解,输出infinite。
如果没有解,输出impossible。
Samples
样例输入1
0 0 0 0
样例输出1
infinite
样例输入2
-1 0 0 5
样例输出2
-5
样例输入3
0 0 0 1
样例输出3
impossible
Limitation
初一上学期期中考试机试(3班)
- Status
- Done
- Rule
- IOI
- Problem
- 4
- Start at
- 2022-11-7 8:45
- End at
- 2022-11-7 10:45
- Duration
- 2 hour(s)
- Host
- Partic.
- 47