Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- int main()
- {
- int N, M, K;
- std::cin >> N >> K >> M;
- int count_substances = K - K % M;
- int count = 0;
- while (N >= K)
- {
- N -= count_substances;
- count++;
- }
- std::cout << count * (K / M) << std::endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment