We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
// progresse와 speed를 넘기면 작업 시간을 반환해주는 함수 // 반복으로 작업시간을 가지고 #include <string> #include <vector> #include <queue> #include <iostream> using namespace std; vector<int> solution(vector<int> progresses, vector<int> speeds) { vector<int> result; queue<int> daysQueue; for (size_t i = 0; i < progresses.size(); ++i) { int remainingProgress = 100 - progresses[i]; int days = (remainingProgress + speeds[i] - 1) / speeds[i]; daysQueue.push(days); } while (!daysQueue.empty()) { int currentDay = daysQueue.front(); daysQueue.pop(); int count = 1; while (!daysQueue.empty() && daysQueue.front() <= currentDay) { daysQueue.pop(); count++; } result.push_back(count); } return result; }
The text was updated successfully, but these errors were encountered:
fkdl0048
No branches or pull requests
The text was updated successfully, but these errors were encountered: