VioletaBabel
태준이의 걱정 본문
#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;}
'알고리즘문제들 > codeground' 카테고리의 다른 글
김씨만 행복한 세상 (0) | 2017.06.28 |
---|---|
스타벅스 (0) | 2017.06.28 |
개구리 뛰기 (0) | 2017.06.17 |
체스판 위의 길 (실패) (0) | 2017.06.17 |
화학자의 문장 (99점) (0) | 2017.06.16 |
Comments