알고리즘문제들/codeground
태준이의 걱정
Beabletoet
2017. 6. 28. 20:57
#include <iostream>using namespace std;int Answer;int main(int argc, char** argv){int T, test_case, a, b, d;cin >> T;for (test_case = 0; test_case < T; test_case++){cin >> a >> b >> d;Answer = 1;d -= a;a -= b;if (d > 0)Answer += d / a;if ((double)d / (double)a != d / a)++Answer;cout << "Case #" << test_case + 1 << endl;cout << Answer << endl;}return 0;}