573 - The Snail

풀이 #include using namespace std; FILE* stream; int main(void) { //freopen_s(&stream, "Text.txt", "r", stdin); int D, F, H; float U; // Double 사용하면 답이 달라짐 while (cin >> H >> U >> D >> F) { if (H == 0) { break; } float f = U * F / 100; // Double 사용하면 답이 달라짐 float i = 0; // Double 사용하면 답이 달라짐 int d = 1; while (true) { // Day i += U; if (U > 0) U -= f; // Leave if (i > H) { break; } //cout
쓴웃음
'573 - The Snail' 태그의 글 목록