2025传智杯复赛第二场官方题解 | T1 | #方程求解#
方程求解
https://www.nowcoder.com/practice/0dae4769a66f44bcb4c5586a52befb28
题解
移项后求解即可。
复杂度
- 时间复杂度:
- 空间复杂度:
参考代码与链接
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
int x = (c - b) / a;
cout << x << '\n';
return 0;
}
