loop fision을 시도했지만 적용 불가한 문제로 판명되었다.
#include <iostream>
using namespace std;
int N, B, U, M, TU, t;
int main() {
ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
cin >> N >> B >> U;
for(t = 1; ; ++t) {
B -= N;
N -= TU;
if (B > 0) {
TU += U;
}
else {
break;
}
}
TU += B;
for (; TU > 0 && N > 0; ++t) {
TU -= N;
N -= TU;
}
if (TU <= 0) {
cout << t;
}
else {
cout << -1;
}
return 0;
}